java.lang.Object | ||
↳ | jline.TerminalSupport | |
↳ | jline.WindowsTerminal |
![]() |
Terminal implementation for Microsoft Windows. Terminal initialization in
init()
is accomplished by extracting the
jline_version.dll, saving it to the system temporary
directoy (determined by the setting of the java.io.tmpdir System
property), loading the library, and then calling the Win32 APIs SetConsoleMode and
GetConsoleMode to
disable character echoing.
By default, the wrapInIfNeeded(java.io.InputStream)
method will attempt
to test to see if the specified InputStream is in
or a wrapper
around in
, and if so, will bypass the character reading to
directly invoke the readc() method in the JNI library. This is so the class
can read special keys (like arrow keys) which are otherwise inaccessible via
the in
stream. Using JNI reading can be bypassed by setting
the jline.WindowsTerminal.directConsole
system property
to false
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WindowsTerminal.ConsoleMode | Console mode Constants copied wincon.h. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ANSI | |||||||||||
DIRECT_CONSOLE |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Whether or not to allow the use of the JNI console interaction.
| |||||||||||
Restore the original terminal configuration, which can be used when
shutting down the console reader.
| |||||||||||
Whether or not to allow the use of the JNI console interaction.
| |||||||||||
When using native support, return the InputStream to use for reading characters
else return the input stream passed as a parameter.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Restore the original terminal configuration, which can be used when shutting down the console reader. The ConsoleReader cannot be used after calling this method.
Exception |
---|
Whether or not to allow the use of the JNI console interaction.
When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.
IOException |
---|