Class TerminalWidth


  • public class TerminalWidth
    extends java.lang.Object
    Returns the column width of the command line terminal from which this program was started. Typically the column width is around 80 characters or so. Currently works on Linux and OSX. Returns -1 if the column width cannot be determined for some reason.
    • Constructor Detail

      • TerminalWidth

        public TerminalWidth()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • getTerminalWidth

        public int getTerminalWidth()
      • getTerminalWidth2

        private int getTerminalWidth2()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • whichSh

        private java.io.File whichSh()
                              throws java.io.IOException
        Throws:
        java.io.IOException