- java.lang.Object
-
- net.sourceforge.argparse4j.internal.TerminalWidth
-
public class TerminalWidth extends java.lang.ObjectReturns 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.
-
-
Field Summary
Fields Modifier and Type Field Description private static intUNKNOWN_WIDTH
-
Constructor Summary
Constructors Constructor Description TerminalWidth()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetTerminalWidth()private intgetTerminalWidth2()static voidmain(java.lang.String[] args)private java.io.FilewhichSh()
-
-
-
Field Detail
-
UNKNOWN_WIDTH
private static final int UNKNOWN_WIDTH
- See Also:
- Constant Field Values
-
-
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
-
-