public class UnixTerminal extends TerminalSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
UnixTerminal.UnixKey
Unix keys.
|
TerminalSupport.RestoreHookDEFAULT_HEIGHT, DEFAULT_KEYBINDINGS_PROPERTIES, DEFAULT_WIDTH| Constructor and Description |
|---|
UnixTerminal() |
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight()
Returns the value of stty rows>/tt> param.
|
protected TerminalLineSettings |
getSettings() |
int |
getWidth()
Returns the value of stty columns param.
|
void |
init()
Remove line-buffered input by invoking "stty -icanon min 1"
against the current terminal.
|
int |
readVirtualKey(InputStream in) |
void |
restore()
Restore the original terminal configuration, which can be used when
shutting down the console reader.
|
void |
setEchoEnabled(boolean enabled) |
getDefaultBindings, installShutdownHook, isAnsiSupported, isEchoEnabled, isSupported, readCharacter, removeShutdownHook, reset, setAnsiSupportedprotected TerminalLineSettings getSettings()
public void init()
throws Exception
init in interface Terminalinit in class TerminalSupportExceptionpublic void restore()
throws Exception
restore in interface Terminalrestore in class TerminalSupportExceptionpublic int getWidth()
getWidth in interface TerminalgetWidth in class TerminalSupportpublic int getHeight()
getHeight in interface TerminalgetHeight in class TerminalSupportpublic void setEchoEnabled(boolean enabled)
setEchoEnabled in interface TerminalsetEchoEnabled in class TerminalSupportpublic int readVirtualKey(InputStream in) throws IOException
readVirtualKey in interface TerminalreadVirtualKey in class TerminalSupportIOExceptionCopyright © 2008-2013 Sonatype. All Rights Reserved.