| |
|
| java.lang.Object jline.Terminal jline.UnixTerminal
UnixTerminal | public class UnixTerminal extends Terminal (Code) | |
Terminal that is used for unix platforms. Terminal initialization
is handled by issuing the stty command against the
/dev/tty file to disable character echoing and enable
character input. All known unix systems (including
Linux and Macintosh OS X) support the stty), so this
implementation should work for an reasonable POSIX system.
author: Marc Prud'hommeaux author: Updates Dale Kemp 2005-12-03 |
Inner Class :static class ReplayPrefixOneCharInputStream extends InputStream | |
ARROW_DOWN | final public static short ARROW_DOWN(Code) | | |
ARROW_LEFT | final public static short ARROW_LEFT(Code) | | |
ARROW_PREFIX | final public static short ARROW_PREFIX(Code) | | |
ARROW_RIGHT | final public static short ARROW_RIGHT(Code) | | |
ARROW_START | final public static short ARROW_START(Code) | | |
ARROW_UP | final public static short ARROW_UP(Code) | | |
DEL_SECOND | final public static short DEL_SECOND(Code) | | |
DEL_THIRD | final public static short DEL_THIRD(Code) | | |
END_CODE | final public static short END_CODE(Code) | | |
HOME_CODE | final public static short HOME_CODE(Code) | | |
O_PREFIX | final public static short O_PREFIX(Code) | | |
replayStream | ReplayPrefixOneCharInputStream replayStream(Code) | | |
UnixTerminal | public UnixTerminal()(Code) | | |
checkBackspace | protected void checkBackspace()(Code) | | |
disableEcho | public synchronized void disableEcho()(Code) | | |
enableEcho | public synchronized void enableEcho()(Code) | | |
getEcho | public boolean getEcho()(Code) | | |
getSttyCommand | public static String getSttyCommand()(Code) | | The command to use to set the terminal options. Defaults
to "stty", or the value of the system property "jline.sttyCommand".
|
getTerminalHeight | public int getTerminalHeight()(Code) | | Returns the value of "stty size" height param.
Note: this method caches the value from the
first time it is called in order to increase speed, which means
that changing to size of the terminal will not be reflected
in the console.
|
getTerminalWidth | public int getTerminalWidth()(Code) | | Returns the value of "stty size" width param.
Note: this method caches the value from the
first time it is called in order to increase speed, which means
that changing to size of the terminal will not be reflected
in the console.
|
initializeTerminal | public void initializeTerminal() throws IOException, InterruptedException(Code) | | Remove line-buffered input by invoking "stty -icanon min 1"
against the current terminal.
|
isEchoEnabled | public synchronized boolean isEchoEnabled()(Code) | | |
isSupported | public boolean isSupported()(Code) | | |
restoreTerminal | public void restoreTerminal() throws Exception(Code) | | Restore the original terminal configuration, which can be used when
shutting down the console reader. The ConsoleReader cannot be
used after calling this method.
|
setSttyCommand | public static void setSttyCommand(String cmd)(Code) | | The command to use to set the terminal options. Defaults
to "stty", or the value of the system property "jline.sttyCommand".
|
|
|
|