Package jline
Interface Terminal
- All Known Subinterfaces:
Terminal2
- All Known Implementing Classes:
AnsiWindowsTerminal
,DefaultTerminal2
,NoInterruptUnixTerminal
,OSvTerminal
,TerminalSupport
,UnixTerminal
,UnsupportedTerminal
,WindowsTerminal
public interface Terminal
Representation of the input terminal for a platform.
- Since:
- 2.0
- Author:
- Marc Prud'hommeaux, Jason Dillon
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
int
int
getWidth()
boolean
For terminals that don't wrap when character is written in last column, only when the next character is written.void
init()
boolean
boolean
boolean
void
reset()
void
restore()
void
setEchoEnabled
(boolean enabled) When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.When ANSI is not natively handled, the output will have to be wrapped.
-
Method Details
-
init
- Throws:
Exception
-
restore
- Throws:
Exception
-
reset
- Throws:
Exception
-
isSupported
boolean isSupported() -
getWidth
int getWidth() -
getHeight
int getHeight() -
isAnsiSupported
boolean isAnsiSupported() -
wrapOutIfNeeded
When ANSI is not natively handled, the output will have to be wrapped. -
wrapInIfNeeded
When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.- Throws:
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
String getOutputEncoding()
-