Package jline
Interface Terminal
-
- All Known Subinterfaces:
Terminal2
- All Known Implementing Classes:
AnsiWindowsTerminal,DefaultTerminal2,NoInterruptUnixTerminal,OSvTerminal,TerminalSupport,UnixTerminal,UnsupportedTerminal,WindowsTerminal
public interface TerminalRepresentation of the input terminal for a platform.- Since:
- 2.0
- Author:
- Marc Prud'hommeaux, Jason Dillon
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisableInterruptCharacter()voidenableInterruptCharacter()intgetHeight()java.lang.StringgetOutputEncoding()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.
-
-
-
Method Detail
-
init
void init() throws java.lang.Exception
- Throws:
java.lang.Exception
-
restore
void restore() throws java.lang.Exception- Throws:
java.lang.Exception
-
reset
void reset() throws java.lang.Exception- Throws:
java.lang.Exception
-
isSupported
boolean isSupported()
-
getWidth
int getWidth()
-
getHeight
int getHeight()
-
isAnsiSupported
boolean isAnsiSupported()
-
wrapOutIfNeeded
java.io.OutputStream wrapOutIfNeeded(java.io.OutputStream out)
When ANSI is not natively handled, the output will have to be wrapped.
-
wrapInIfNeeded
java.io.InputStream wrapInIfNeeded(java.io.InputStream in) throws java.io.IOExceptionWhen using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.- Throws:
java.io.IOException- Since:
- 2.6
-
hasWeirdWrap
boolean hasWeirdWrap()
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)
-
isEchoEnabled
boolean isEchoEnabled()
-
setEchoEnabled
void setEchoEnabled(boolean enabled)
-
disableInterruptCharacter
void disableInterruptCharacter()
-
enableInterruptCharacter
void enableInterruptCharacter()
-
getOutputEncoding
java.lang.String getOutputEncoding()
-
-