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 voiddisableInterruptCharacter()voidenableInterruptCharacter()booleangetBooleanCapability(java.lang.String capability)intgetHeight()java.lang.IntegergetNumericCapability(java.lang.String capability)java.lang.StringgetOutputEncoding()java.lang.StringgetStringCapability(java.lang.String capability)intgetWidth()booleanhasWeirdWrap()For terminals that don't wrap when character is written in last column, only when the next character is written.voidinit()booleanisAnsiSupported()booleanisEchoEnabled()booleanisSupported()voidreset()voidrestore()voidsetEchoEnabled(boolean enabled)java.io.InputStreamwrapInIfNeeded(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.OutputStreamwrapOutIfNeeded(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:
isSupportedin interfaceTerminal
-
isAnsiSupported
public boolean isAnsiSupported()
- Specified by:
isAnsiSupportedin interfaceTerminal
-
wrapOutIfNeeded
public java.io.OutputStream wrapOutIfNeeded(java.io.OutputStream out)
Description copied from interface:TerminalWhen ANSI is not natively handled, the output will have to be wrapped.- Specified by:
wrapOutIfNeededin interfaceTerminal
-
wrapInIfNeeded
public java.io.InputStream wrapInIfNeeded(java.io.InputStream in) throws java.io.IOExceptionDescription copied from interface:TerminalWhen using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.- Specified by:
wrapInIfNeededin interfaceTerminal- Throws:
java.io.IOException
-
hasWeirdWrap
public boolean hasWeirdWrap()
Description copied from interface:TerminalFor 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:
hasWeirdWrapin interfaceTerminal
-
isEchoEnabled
public boolean isEchoEnabled()
- Specified by:
isEchoEnabledin interfaceTerminal
-
setEchoEnabled
public void setEchoEnabled(boolean enabled)
- Specified by:
setEchoEnabledin interfaceTerminal
-
disableInterruptCharacter
public void disableInterruptCharacter()
- Specified by:
disableInterruptCharacterin interfaceTerminal
-
enableInterruptCharacter
public void enableInterruptCharacter()
- Specified by:
enableInterruptCharacterin interfaceTerminal
-
getOutputEncoding
public java.lang.String getOutputEncoding()
- Specified by:
getOutputEncodingin interfaceTerminal
-
getBooleanCapability
public boolean getBooleanCapability(java.lang.String capability)
- Specified by:
getBooleanCapabilityin interfaceTerminal2
-
getNumericCapability
public java.lang.Integer getNumericCapability(java.lang.String capability)
- Specified by:
getNumericCapabilityin interfaceTerminal2
-
getStringCapability
public java.lang.String getStringCapability(java.lang.String capability)
- Specified by:
getStringCapabilityin interfaceTerminal2
-
-