public abstract class TerminalSupport extends Object implements Terminal
Terminal instances.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HEIGHT |
static int |
DEFAULT_WIDTH |
| Modifier | Constructor and Description |
|---|---|
protected |
TerminalSupport(boolean supported) |
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
String |
getOutputEncoding() |
int |
getWidth() |
boolean |
hasWeirdWrap()
Defaults to true which was the behaviour before this method was added.
|
void |
init() |
boolean |
isAnsiSupported() |
boolean |
isEchoEnabled() |
boolean |
isSupported() |
void |
reset() |
void |
restore() |
protected void |
setAnsiSupported(boolean supported) |
void |
setEchoEnabled(boolean enabled) |
InputStream |
wrapInIfNeeded(InputStream in)
When using native support, return the InputStream to use for reading characters
else return the input stream passed as a parameter.
|
OutputStream |
wrapOutIfNeeded(OutputStream out)
Subclass to change behavior if needed.
|
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public void restore()
throws Exception
public void reset()
throws Exception
public final boolean isSupported()
isSupported in interface Terminalpublic boolean isAnsiSupported()
isAnsiSupported in interface Terminalprotected void setAnsiSupported(boolean supported)
public OutputStream wrapOutIfNeeded(OutputStream out)
wrapOutIfNeeded in interface Terminalpublic boolean hasWeirdWrap()
hasWeirdWrap in interface Terminalpublic boolean isEchoEnabled()
isEchoEnabled in interface Terminalpublic void setEchoEnabled(boolean enabled)
setEchoEnabled in interface Terminalpublic InputStream wrapInIfNeeded(InputStream in) throws IOException
TerminalwrapInIfNeeded in interface TerminalIOExceptionpublic String getOutputEncoding()
getOutputEncoding in interface TerminalCopyright © 2014. All Rights Reserved.