public final class WindowsAnsiPrintStream extends AnsiPrintStream
The native library used is named jansi and is loaded using HawtJNI Runtime
Library
WindowsAnsiOutputStream| Modifier and Type | Field and Description |
|---|---|
private static short[] |
ANSI_BACKGROUND_COLOR_MAP |
private static short[] |
ANSI_FOREGROUND_COLOR_MAP |
private static short |
BACKGROUND_BLACK |
private static short |
BACKGROUND_CYAN |
private static short |
BACKGROUND_MAGENTA |
private static short |
BACKGROUND_WHITE |
private static short |
BACKGROUND_YELLOW |
private long |
console |
private static short |
FOREGROUND_BLACK |
private static short |
FOREGROUND_CYAN |
private static short |
FOREGROUND_MAGENTA |
private static short |
FOREGROUND_WHITE |
private static short |
FOREGROUND_YELLOW |
private org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO |
info |
private boolean |
negative |
private short |
originalColors |
private short |
savedX |
private short |
savedY |
private static long |
stderr_handle |
private static long |
stdout_handle |
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, state, WHITE, YELLOWps| Constructor and Description |
|---|
WindowsAnsiPrintStream(java.io.PrintStream ps) |
WindowsAnsiPrintStream(java.io.PrintStream ps,
boolean stdout) |
| Modifier and Type | Method and Description |
|---|---|
private void |
applyAttribute() |
private void |
applyCursorPosition() |
private void |
getConsoleInfo() |
private short |
invertAttributeColors(short attributes) |
protected void |
processAttributeRest()
process
SGR 0 corresponding to Reset / Normal |
protected void |
processChangeWindowTitle(java.lang.String label)
process
OSC 2;text BEL corresponding to Change Window title |
protected void |
processCursorDown(int count)
process
CSI n B corresponding to CUD – Cursor Down |
protected void |
processCursorLeft(int count)
process
CSI n D corresponding to CUB – Cursor Back |
protected void |
processCursorRight(int count)
process
CSI n C corresponding to CUF – Cursor Forward |
protected void |
processCursorTo(int row,
int col)
process
CSI n ; m H corresponding to CUP – Cursor Position or
CSI n ; m f corresponding to HVP – Horizontal and Vertical Position |
protected void |
processCursorToColumn(int x)
process
CSI n G corresponding to CHA – Cursor Horizontal Absolute |
protected void |
processCursorUp(int count)
process
CSI n A corresponding to CUU – Cursor Up |
protected void |
processDefaultBackgroundColor()
process
SGR 49 corresponding to Default background color |
protected void |
processDefaultTextColor()
process
SGR 39 corresponding to Default text color (foreground) |
protected void |
processDeleteLine(int optionInt)
Process
CSI M ANSI code, corresponding to DL – Delete Line |
protected void |
processEraseLine(int eraseOption)
Process
CSI n K ANSI code, corresponding to ED – Erase in Line |
protected void |
processEraseScreen(int eraseOption)
Process
CSI n J ANSI code, corresponding to ED – Erase in Display |
protected void |
processInsertLine(int optionInt)
Process
CSI L ANSI code, corresponding to IL – Insert Line |
protected void |
processRestoreCursorPosition()
Process
CSI u ANSI code, corresponding to RCP – Restore Cursor Position |
protected void |
processSaveCursorPosition()
Process
CSI s ANSI code, corresponding to SCP – Save Cursor Position |
protected void |
processSetAttribute(int attribute)
process
SGR other than 0 (reset), 30-39 (foreground),
40-49 (background), 90-97 (foreground high intensity) or
100-107 (background high intensity) |
protected void |
processSetBackgroundColor(int color,
boolean bright)
process
SGR 40-47 or SGR 100-107 corresponding to
Set background color either in normal mode or high intensity. |
protected void |
processSetForegroundColor(int color,
boolean bright)
process
SGR 30-37 or SGR 90-97 corresponding to
Set text color (foreground) either in normal mode or high intensity. |
close, filter, processChangeIconName, processChangeIconNameAndWindowTitle, processCharsetSelect, processCursorDownLine, processCursorUpLine, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColorExt, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColorExt, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommandcheckError, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, write, writeprivate static final long stdout_handle
private static final long stderr_handle
private final long console
private static final short FOREGROUND_BLACK
private static final short FOREGROUND_YELLOW
private static final short FOREGROUND_MAGENTA
private static final short FOREGROUND_CYAN
private static final short FOREGROUND_WHITE
private static final short BACKGROUND_BLACK
private static final short BACKGROUND_YELLOW
private static final short BACKGROUND_MAGENTA
private static final short BACKGROUND_CYAN
private static final short BACKGROUND_WHITE
private static final short[] ANSI_FOREGROUND_COLOR_MAP
private static final short[] ANSI_BACKGROUND_COLOR_MAP
private final org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO info
private final short originalColors
private boolean negative
private short savedX
private short savedY
public WindowsAnsiPrintStream(java.io.PrintStream ps,
boolean stdout)
throws java.io.IOException
java.io.IOExceptionpublic WindowsAnsiPrintStream(java.io.PrintStream ps)
throws java.io.IOException
java.io.IOExceptionprivate void getConsoleInfo()
throws java.io.IOException
java.io.IOExceptionprivate void applyAttribute()
throws java.io.IOException
java.io.IOExceptionprivate short invertAttributeColors(short attributes)
private void applyCursorPosition()
throws java.io.IOException
java.io.IOExceptionprotected void processEraseScreen(int eraseOption)
throws java.io.IOException
AnsiPrintStreamCSI n J ANSI code, corresponding to ED – Erase in DisplayprocessEraseScreen in class AnsiPrintStreameraseOption - eraseOptionjava.io.IOException - IOExceptionprotected void processEraseLine(int eraseOption)
throws java.io.IOException
AnsiPrintStreamCSI n K ANSI code, corresponding to ED – Erase in LineprocessEraseLine in class AnsiPrintStreameraseOption - eraseOptionjava.io.IOException - IOExceptionprotected void processCursorLeft(int count)
throws java.io.IOException
AnsiPrintStreamCSI n D corresponding to CUB – Cursor BackprocessCursorLeft in class AnsiPrintStreamcount - countjava.io.IOException - IOExceptionprotected void processCursorRight(int count)
throws java.io.IOException
AnsiPrintStreamCSI n C corresponding to CUF – Cursor ForwardprocessCursorRight in class AnsiPrintStreamcount - countjava.io.IOException - IOExceptionprotected void processCursorDown(int count)
throws java.io.IOException
AnsiPrintStreamCSI n B corresponding to CUD – Cursor DownprocessCursorDown in class AnsiPrintStreamcount - countjava.io.IOException - IOExceptionprotected void processCursorUp(int count)
throws java.io.IOException
AnsiPrintStreamCSI n A corresponding to CUU – Cursor UpprocessCursorUp in class AnsiPrintStreamcount - countjava.io.IOException - IOExceptionprotected void processCursorTo(int row,
int col)
throws java.io.IOException
AnsiPrintStreamCSI n ; m H corresponding to CUP – Cursor Position or
CSI n ; m f corresponding to HVP – Horizontal and Vertical PositionprocessCursorTo in class AnsiPrintStreamrow - rowcol - coljava.io.IOException - IOExceptionprotected void processCursorToColumn(int x)
throws java.io.IOException
AnsiPrintStreamCSI n G corresponding to CHA – Cursor Horizontal AbsoluteprocessCursorToColumn in class AnsiPrintStreamx - the columnjava.io.IOException - IOExceptionprotected void processSetForegroundColor(int color,
boolean bright)
throws java.io.IOException
AnsiPrintStreamSGR 30-37 or SGR 90-97 corresponding to
Set text color (foreground) either in normal mode or high intensity.processSetForegroundColor in class AnsiPrintStreamcolor - the text colorbright - is high intensity?java.io.IOException - IOExceptionprotected void processSetBackgroundColor(int color,
boolean bright)
throws java.io.IOException
AnsiPrintStreamSGR 40-47 or SGR 100-107 corresponding to
Set background color either in normal mode or high intensity.processSetBackgroundColor in class AnsiPrintStreamcolor - the background colorbright - is high intensity?java.io.IOException - IOExceptionprotected void processDefaultTextColor()
throws java.io.IOException
AnsiPrintStreamSGR 39 corresponding to Default text color (foreground)processDefaultTextColor in class AnsiPrintStreamjava.io.IOException - IOExceptionprotected void processDefaultBackgroundColor()
throws java.io.IOException
AnsiPrintStreamSGR 49 corresponding to Default background colorprocessDefaultBackgroundColor in class AnsiPrintStreamjava.io.IOException - IOExceptionprotected void processAttributeRest()
throws java.io.IOException
AnsiPrintStreamSGR 0 corresponding to Reset / NormalprocessAttributeRest in class AnsiPrintStreamjava.io.IOException - IOExceptionprotected void processSetAttribute(int attribute)
throws java.io.IOException
AnsiPrintStreamSGR other than 0 (reset), 30-39 (foreground),
40-49 (background), 90-97 (foreground high intensity) or
100-107 (background high intensity)processSetAttribute in class AnsiPrintStreamattribute - attributejava.io.IOException - IOExceptionAnsiPrintStream.processAttributeRest(),
AnsiPrintStream.processSetForegroundColor(int),
AnsiPrintStream.processSetForegroundColor(int, boolean),
AnsiPrintStream.processSetForegroundColorExt(int),
AnsiPrintStream.processSetForegroundColorExt(int, int, int),
AnsiPrintStream.processDefaultTextColor(),
AnsiPrintStream.processDefaultBackgroundColor()protected void processSaveCursorPosition()
throws java.io.IOException
AnsiPrintStreamCSI s ANSI code, corresponding to SCP – Save Cursor PositionprocessSaveCursorPosition in class AnsiPrintStreamjava.io.IOException - IOExceptionprotected void processRestoreCursorPosition()
throws java.io.IOException
AnsiPrintStreamCSI u ANSI code, corresponding to RCP – Restore Cursor PositionprocessRestoreCursorPosition in class AnsiPrintStreamjava.io.IOException - IOExceptionprotected void processInsertLine(int optionInt)
throws java.io.IOException
AnsiPrintStreamCSI L ANSI code, corresponding to IL – Insert LineprocessInsertLine in class AnsiPrintStreamoptionInt - optionjava.io.IOException - IOExceptionprotected void processDeleteLine(int optionInt)
throws java.io.IOException
AnsiPrintStreamCSI M ANSI code, corresponding to DL – Delete LineprocessDeleteLine in class AnsiPrintStreamoptionInt - optionjava.io.IOException - IOExceptionprotected void processChangeWindowTitle(java.lang.String label)
AnsiPrintStreamOSC 2;text BEL corresponding to Change Window titleprocessChangeWindowTitle in class AnsiPrintStreamlabel - window title text