Package org.fusesource.jansi
Class WindowsAnsiOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.fusesource.jansi.AnsiOutputStream
org.fusesource.jansi.WindowsAnsiOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Deprecated.
A Windows ANSI escape processor, that uses JNA to access native platform
API's to change the console attributes.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final short[]
Deprecated.private static final short[]
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private final long
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private static final short
Deprecated.private final org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO
Deprecated.private boolean
Deprecated.private final short
Deprecated.private short
Deprecated.private short
Deprecated.private static final long
Deprecated.private static final long
Deprecated.Fields inherited from class org.fusesource.jansi.AnsiOutputStream
ATTRIBUTE_BLINK_FAST, ATTRIBUTE_BLINK_OFF, ATTRIBUTE_BLINK_SLOW, ATTRIBUTE_CONCEAL_OFF, ATTRIBUTE_CONCEAL_ON, ATTRIBUTE_INTENSITY_BOLD, ATTRIBUTE_INTENSITY_FAINT, ATTRIBUTE_INTENSITY_NORMAL, ATTRIBUTE_ITALIC, ATTRIBUTE_NEGATIVE_Off, ATTRIBUTE_NEGATIVE_OFF, ATTRIBUTE_NEGATIVE_ON, ATTRIBUTE_UNDERLINE, ATTRIBUTE_UNDERLINE_DOUBLE, ATTRIBUTE_UNDERLINE_OFF, BLACK, BLUE, CYAN, ERASE_LINE, ERASE_LINE_TO_BEGINING, ERASE_LINE_TO_END, ERASE_SCREEN, ERASE_SCREEN_TO_BEGINING, ERASE_SCREEN_TO_END, GREEN, MAGENTA, RED, RESET_CODE, REST_CODE, state, WHITE, YELLOW
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WindowsAnsiOutputStream
(OutputStream os, boolean stdout) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Deprecated.private void
Deprecated.private void
Deprecated.private short
invertAttributeColors
(short attributes) Deprecated.protected void
Deprecated.processSGR 0
corresponding toReset / Normal
protected void
processChangeWindowTitle
(String label) Deprecated.processOSC 2;text BEL
corresponding toChange Window title
protected void
processCursorDown
(int count) Deprecated.processCSI n B
corresponding toCUD – Cursor Down
protected void
processCursorLeft
(int count) Deprecated.processCSI n D
corresponding toCUB – Cursor Back
protected void
processCursorRight
(int count) Deprecated.processCSI n C
corresponding toCUF – Cursor Forward
protected void
processCursorTo
(int row, int col) Deprecated.processCSI n ; m H
corresponding toCUP – Cursor Position
orCSI n ; m f
corresponding toHVP – Horizontal and Vertical Position
protected void
processCursorToColumn
(int x) Deprecated.processCSI n G
corresponding toCHA – Cursor Horizontal Absolute
protected void
processCursorUp
(int count) Deprecated.processCSI n A
corresponding toCUU – Cursor Up
protected void
Deprecated.processSGR 49
corresponding toDefault background color
protected void
Deprecated.processSGR 39
corresponding toDefault text color (foreground)
protected void
processDeleteLine
(int optionInt) Deprecated.ProcessCSI M
ANSI code, corresponding toDL – Delete Line
protected void
processEraseLine
(int eraseOption) Deprecated.ProcessCSI n K
ANSI code, corresponding toED – Erase in Line
protected void
processEraseScreen
(int eraseOption) Deprecated.ProcessCSI n J
ANSI code, corresponding toED – Erase in Display
protected void
processInsertLine
(int optionInt) Deprecated.ProcessCSI L
ANSI code, corresponding toIL – Insert Line
protected void
Deprecated.ProcessCSI u
ANSI code, corresponding toRCP – Restore Cursor Position
protected void
Deprecated.ProcessCSI s
ANSI code, corresponding toSCP – Save Cursor Position
protected void
processSetAttribute
(int attribute) Deprecated.processSGR
other than0
(reset),30-39
(foreground),40-49
(background),90-97
(foreground high intensity) or100-107
(background high intensity)protected void
processSetBackgroundColor
(int color, boolean bright) Deprecated.processSGR 40-47
orSGR 100-107
corresponding toSet background color
either in normal mode or high intensity.protected void
processSetForegroundColor
(int color, boolean bright) Deprecated.processSGR 30-37
orSGR 90-97
corresponding toSet text color (foreground)
either in normal mode or high intensity.Methods inherited from class org.fusesource.jansi.AnsiOutputStream
close, processChangeIconName, processChangeIconNameAndWindowTitle, processCharsetSelect, processCursorDownLine, processCursorUpLine, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColorExt, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColorExt, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommand, write
Methods inherited from class java.io.FilterOutputStream
flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
stdout_handle
private static final long stdout_handleDeprecated. -
stderr_handle
private static final long stderr_handleDeprecated. -
console
private final long consoleDeprecated. -
FOREGROUND_BLACK
private static final short FOREGROUND_BLACKDeprecated.- See Also:
-
FOREGROUND_YELLOW
private static final short FOREGROUND_YELLOWDeprecated. -
FOREGROUND_MAGENTA
private static final short FOREGROUND_MAGENTADeprecated. -
FOREGROUND_CYAN
private static final short FOREGROUND_CYANDeprecated. -
FOREGROUND_WHITE
private static final short FOREGROUND_WHITEDeprecated. -
BACKGROUND_BLACK
private static final short BACKGROUND_BLACKDeprecated.- See Also:
-
BACKGROUND_YELLOW
private static final short BACKGROUND_YELLOWDeprecated. -
BACKGROUND_MAGENTA
private static final short BACKGROUND_MAGENTADeprecated. -
BACKGROUND_CYAN
private static final short BACKGROUND_CYANDeprecated. -
BACKGROUND_WHITE
private static final short BACKGROUND_WHITEDeprecated. -
ANSI_FOREGROUND_COLOR_MAP
private static final short[] ANSI_FOREGROUND_COLOR_MAPDeprecated. -
ANSI_BACKGROUND_COLOR_MAP
private static final short[] ANSI_BACKGROUND_COLOR_MAPDeprecated. -
info
private final org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO infoDeprecated. -
originalColors
private final short originalColorsDeprecated. -
negative
private boolean negativeDeprecated. -
savedX
private short savedXDeprecated. -
savedY
private short savedYDeprecated.
-
-
Constructor Details
-
WindowsAnsiOutputStream
Deprecated.- Throws:
IOException
-
WindowsAnsiOutputStream
Deprecated.- Throws:
IOException
-
-
Method Details
-
getConsoleInfo
Deprecated.- Throws:
IOException
-
applyAttribute
Deprecated.- Throws:
IOException
-
invertAttributeColors
private short invertAttributeColors(short attributes) Deprecated. -
applyCursorPosition
Deprecated.- Throws:
IOException
-
processEraseScreen
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI n J
ANSI code, corresponding toED – Erase in Display
- Overrides:
processEraseScreen
in classAnsiOutputStream
- Parameters:
eraseOption
- eraseOption- Throws:
IOException
- IOException
-
processEraseLine
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI n K
ANSI code, corresponding toED – Erase in Line
- Overrides:
processEraseLine
in classAnsiOutputStream
- Parameters:
eraseOption
- eraseOption- Throws:
IOException
- IOException
-
processCursorLeft
Deprecated.Description copied from class:AnsiOutputStream
processCSI n D
corresponding toCUB – Cursor Back
- Overrides:
processCursorLeft
in classAnsiOutputStream
- Parameters:
count
- numer of characters to move left- Throws:
IOException
- IOException
-
processCursorRight
Deprecated.Description copied from class:AnsiOutputStream
processCSI n C
corresponding toCUF – Cursor Forward
- Overrides:
processCursorRight
in classAnsiOutputStream
- Parameters:
count
- number of characters to move on- Throws:
IOException
- IOException
-
processCursorDown
Deprecated.Description copied from class:AnsiOutputStream
processCSI n B
corresponding toCUD – Cursor Down
- Overrides:
processCursorDown
in classAnsiOutputStream
- Parameters:
count
- numer of line- Throws:
IOException
- IOException
-
processCursorUp
Deprecated.Description copied from class:AnsiOutputStream
processCSI n A
corresponding toCUU – Cursor Up
- Overrides:
processCursorUp
in classAnsiOutputStream
- Parameters:
count
- number of lines- Throws:
IOException
- IOException
-
processCursorTo
Deprecated.Description copied from class:AnsiOutputStream
processCSI n ; m H
corresponding toCUP – Cursor Position
orCSI n ; m f
corresponding toHVP – Horizontal and Vertical Position
- Overrides:
processCursorTo
in classAnsiOutputStream
- Parameters:
row
- rowcol
- column- Throws:
IOException
- IOException
-
processCursorToColumn
Deprecated.Description copied from class:AnsiOutputStream
processCSI n G
corresponding toCHA – Cursor Horizontal Absolute
- Overrides:
processCursorToColumn
in classAnsiOutputStream
- Parameters:
x
- the column- Throws:
IOException
- IOException
-
processSetForegroundColor
Deprecated.Description copied from class:AnsiOutputStream
processSGR 30-37
orSGR 90-97
corresponding toSet text color (foreground)
either in normal mode or high intensity.- Overrides:
processSetForegroundColor
in classAnsiOutputStream
- Parameters:
color
- the text colorbright
- is high intensity?- Throws:
IOException
- IOException
-
processSetBackgroundColor
Deprecated.Description copied from class:AnsiOutputStream
processSGR 40-47
orSGR 100-107
corresponding toSet background color
either in normal mode or high intensity.- Overrides:
processSetBackgroundColor
in classAnsiOutputStream
- Parameters:
color
- the background colorbright
- is high intensity?- Throws:
IOException
- IOException
-
processDefaultTextColor
Deprecated.Description copied from class:AnsiOutputStream
processSGR 39
corresponding toDefault text color (foreground)
- Overrides:
processDefaultTextColor
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processDefaultBackgroundColor
Deprecated.Description copied from class:AnsiOutputStream
processSGR 49
corresponding toDefault background color
- Overrides:
processDefaultBackgroundColor
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processAttributeRest
Deprecated.Description copied from class:AnsiOutputStream
processSGR 0
corresponding toReset / Normal
- Overrides:
processAttributeRest
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processSetAttribute
Deprecated.Description copied from class:AnsiOutputStream
processSGR
other than0
(reset),30-39
(foreground),40-49
(background),90-97
(foreground high intensity) or100-107
(background high intensity)- Overrides:
processSetAttribute
in classAnsiOutputStream
- Parameters:
attribute
- attribute- Throws:
IOException
- IOException- See Also:
-
processSaveCursorPosition
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI s
ANSI code, corresponding toSCP – Save Cursor Position
- Overrides:
processSaveCursorPosition
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processRestoreCursorPosition
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI u
ANSI code, corresponding toRCP – Restore Cursor Position
- Overrides:
processRestoreCursorPosition
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processInsertLine
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI L
ANSI code, corresponding toIL – Insert Line
- Overrides:
processInsertLine
in classAnsiOutputStream
- Parameters:
optionInt
- option- Throws:
IOException
- IOException
-
processDeleteLine
Deprecated.Description copied from class:AnsiOutputStream
ProcessCSI M
ANSI code, corresponding toDL – Delete Line
- Overrides:
processDeleteLine
in classAnsiOutputStream
- Parameters:
optionInt
- option- Throws:
IOException
- IOException
-
processChangeWindowTitle
Deprecated.Description copied from class:AnsiOutputStream
processOSC 2;text BEL
corresponding toChange Window title
- Overrides:
processChangeWindowTitle
in classAnsiOutputStream
- Parameters:
label
- window label
-
WindowsAnsiPrintStream
, which does not suffer from encoding issues