Package jline
Class AnsiWindowsTerminal
- java.lang.Object
-
- jline.TerminalSupport
-
- jline.WindowsTerminal
-
- jline.AnsiWindowsTerminal
-
- All Implemented Interfaces:
Terminal
public class AnsiWindowsTerminal extends WindowsTerminal
ANSI-supportedWindowsTerminal.- Since:
- 2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jline.WindowsTerminal
WindowsTerminal.ConsoleMode
-
-
Field Summary
Fields Modifier and Type Field Description private booleanansiSupported-
Fields inherited from class jline.WindowsTerminal
ANSI, DIRECT_CONSOLE
-
Fields inherited from class jline.TerminalSupport
DEFAULT_HEIGHT, DEFAULT_WIDTH
-
-
Constructor Summary
Constructors Constructor Description AnsiWindowsTerminal()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static booleandetectAnsiSupport()booleanhasWeirdWrap()Defaults to true which was the behaviour before this method was added.booleanisAnsiSupported()java.io.OutputStreamwrapOutIfNeeded(java.io.OutputStream out)Subclass to change behavior if needed.private static java.io.OutputStreamwrapOutputStream(java.io.OutputStream stream)Returns an ansi output stream handler.-
Methods inherited from class jline.WindowsTerminal
disableInterruptCharacter, enableInterruptCharacter, getDirectConsole, getHeight, getOutputEncoding, getWidth, init, isSystemIn, restore, setDirectConsole, setEchoEnabled, wrapInIfNeeded
-
Methods inherited from class jline.TerminalSupport
isEchoEnabled, isSupported, reset, setAnsiSupported
-
-
-
-
Method Detail
-
wrapOutIfNeeded
public java.io.OutputStream wrapOutIfNeeded(java.io.OutputStream out)
Description copied from class:TerminalSupportSubclass to change behavior if needed.- Specified by:
wrapOutIfNeededin interfaceTerminal- Overrides:
wrapOutIfNeededin classTerminalSupport- Returns:
- the passed out
-
wrapOutputStream
private static java.io.OutputStream wrapOutputStream(java.io.OutputStream stream)
Returns an ansi output stream handler. We return whatever was passed if we determine we cannot handle ansi based on Kernel32 calls.- Returns:
- an @{link AltWindowAnsiOutputStream} instance or the passed stream.
-
detectAnsiSupport
private static boolean detectAnsiSupport()
-
isAnsiSupported
public boolean isAnsiSupported()
- Specified by:
isAnsiSupportedin interfaceTerminal- Overrides:
isAnsiSupportedin classTerminalSupport
-
hasWeirdWrap
public boolean hasWeirdWrap()
Description copied from class:TerminalSupportDefaults to true which was the behaviour before this method was added.- Specified by:
hasWeirdWrapin interfaceTerminal- Overrides:
hasWeirdWrapin classTerminalSupport
-
-