public class UnixTerminal extends TerminalSupport
Modifier and Type | Class and Description |
---|---|
static class |
UnixTerminal.UnixKey
Unix keys.
|
TerminalSupport.RestoreHook
DEFAULT_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, setAnsiSupported
protected TerminalLineSettings getSettings()
public void init() throws Exception
init
in interface Terminal
init
in class TerminalSupport
Exception
public void restore() throws Exception
restore
in interface Terminal
restore
in class TerminalSupport
Exception
public int getWidth()
getWidth
in interface Terminal
getWidth
in class TerminalSupport
public int getHeight()
getHeight
in interface Terminal
getHeight
in class TerminalSupport
public void setEchoEnabled(boolean enabled)
setEchoEnabled
in interface Terminal
setEchoEnabled
in class TerminalSupport
public int readVirtualKey(InputStream in) throws IOException
readVirtualKey
in interface Terminal
readVirtualKey
in class TerminalSupport
IOException
Copyright © 2008-2012 Sonatype. All Rights Reserved.