public class WindowsTerminal extends TerminalSupport
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 System.in or a wrapper
 around FileDescriptor.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 System.in stream. Using JNI reading can be bypassed by setting
 the jline.WindowsTerminal.directConsole system property
 to false.
 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | WindowsTerminal.ConsoleModeConsole mode
 
 Constants copied wincon.h. | 
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | ANSI | 
| static java.lang.String | DIRECT_CONSOLE | 
DEFAULT_HEIGHT, DEFAULT_WIDTH| Constructor and Description | 
|---|
| WindowsTerminal() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | disableInterruptCharacter() | 
| void | enableInterruptCharacter() | 
| java.lang.Boolean | getDirectConsole()Whether or not to allow the use of the JNI console interaction. | 
| int | getHeight() | 
| java.lang.String | getOutputEncoding() | 
| int | getWidth() | 
| void | init() | 
| protected boolean | isSystemIn(java.io.InputStream in) | 
| void | restore()Restore the original terminal configuration, which can be used when
 shutting down the console reader. | 
| void | setDirectConsole(boolean flag)Whether or not to allow the use of the JNI console interaction. | 
| 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. | 
hasWeirdWrap, isAnsiSupported, isEchoEnabled, isSupported, reset, setAnsiSupported, wrapOutIfNeededpublic static final java.lang.String DIRECT_CONSOLE
public static final java.lang.String ANSI
public WindowsTerminal()
                throws java.lang.Exception
java.lang.Exceptionpublic void init()
          throws java.lang.Exception
init in interface Terminalinit in class TerminalSupportjava.lang.Exceptionpublic void restore()
             throws java.lang.Exception
restore in interface Terminalrestore in class TerminalSupportjava.lang.Exceptionpublic int getWidth()
getWidth in interface TerminalgetWidth in class TerminalSupportpublic int getHeight()
getHeight in interface TerminalgetHeight in class TerminalSupportpublic void setEchoEnabled(boolean enabled)
setEchoEnabled in interface TerminalsetEchoEnabled in class TerminalSupportpublic void disableInterruptCharacter()
disableInterruptCharacter in interface TerminaldisableInterruptCharacter in class TerminalSupportpublic void enableInterruptCharacter()
enableInterruptCharacter in interface TerminalenableInterruptCharacter in class TerminalSupportpublic void setDirectConsole(boolean flag)
public java.lang.Boolean getDirectConsole()
public java.io.InputStream wrapInIfNeeded(java.io.InputStream in)
                                   throws java.io.IOException
TerminalwrapInIfNeeded in interface TerminalwrapInIfNeeded in class TerminalSupportjava.io.IOExceptionprotected boolean isSystemIn(java.io.InputStream in)
                      throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getOutputEncoding()
getOutputEncoding in interface TerminalgetOutputEncoding in class TerminalSupportCopyright © 2018. All Rights Reserved.