Package jline
Class DefaultTerminal2
- java.lang.Object
-
- jline.DefaultTerminal2
-
-
Constructor Summary
Constructors Constructor Description DefaultTerminal2(Terminal terminal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableInterruptCharacter()
void
enableInterruptCharacter()
boolean
getBooleanCapability(java.lang.String capability)
int
getHeight()
java.lang.Integer
getNumericCapability(java.lang.String capability)
java.lang.String
getOutputEncoding()
java.lang.String
getStringCapability(java.lang.String capability)
int
getWidth()
boolean
hasWeirdWrap()
For terminals that don't wrap when character is written in last column, only when the next character is written.void
init()
boolean
isAnsiSupported()
boolean
isEchoEnabled()
boolean
isSupported()
void
reset()
void
restore()
void
setEchoEnabled(boolean enabled)
java.io.InputStream
wrapInIfNeeded(java.io.InputStream in)
When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.java.io.OutputStream
wrapOutIfNeeded(java.io.OutputStream out)
When ANSI is not natively handled, the output will have to be wrapped.
-
-
-
Constructor Detail
-
DefaultTerminal2
public DefaultTerminal2(Terminal terminal)
-
-
Method Detail
-
init
public void init() throws java.lang.Exception
-
restore
public void restore() throws java.lang.Exception
-
reset
public void reset() throws java.lang.Exception
-
isSupported
public boolean isSupported()
- Specified by:
isSupported
in interfaceTerminal
-
isAnsiSupported
public boolean isAnsiSupported()
- Specified by:
isAnsiSupported
in interfaceTerminal
-
wrapOutIfNeeded
public java.io.OutputStream wrapOutIfNeeded(java.io.OutputStream out)
Description copied from interface:Terminal
When ANSI is not natively handled, the output will have to be wrapped.- Specified by:
wrapOutIfNeeded
in interfaceTerminal
-
wrapInIfNeeded
public java.io.InputStream wrapInIfNeeded(java.io.InputStream in) throws java.io.IOException
Description copied from interface:Terminal
When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.- Specified by:
wrapInIfNeeded
in interfaceTerminal
- Throws:
java.io.IOException
-
hasWeirdWrap
public boolean hasWeirdWrap()
Description copied from interface:Terminal
For terminals that don't wrap when character is written in last column, only when the next character is written. These are the ones that have 'am' and 'xn' termcap attributes (xterm and rxvt flavors falls under that category)- Specified by:
hasWeirdWrap
in interfaceTerminal
-
isEchoEnabled
public boolean isEchoEnabled()
- Specified by:
isEchoEnabled
in interfaceTerminal
-
setEchoEnabled
public void setEchoEnabled(boolean enabled)
- Specified by:
setEchoEnabled
in interfaceTerminal
-
disableInterruptCharacter
public void disableInterruptCharacter()
- Specified by:
disableInterruptCharacter
in interfaceTerminal
-
enableInterruptCharacter
public void enableInterruptCharacter()
- Specified by:
enableInterruptCharacter
in interfaceTerminal
-
getOutputEncoding
public java.lang.String getOutputEncoding()
- Specified by:
getOutputEncoding
in interfaceTerminal
-
getBooleanCapability
public boolean getBooleanCapability(java.lang.String capability)
- Specified by:
getBooleanCapability
in interfaceTerminal2
-
getNumericCapability
public java.lang.Integer getNumericCapability(java.lang.String capability)
- Specified by:
getNumericCapability
in interfaceTerminal2
-
getStringCapability
public java.lang.String getStringCapability(java.lang.String capability)
- Specified by:
getStringCapability
in interfaceTerminal2
-
-