public class HtmlAnsiOutputStream extends AnsiOutputStream
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
ANSI_COLOR_MAP |
private static byte[] |
BYTES_AMP |
private static byte[] |
BYTES_GT |
private static byte[] |
BYTES_LT |
private static byte[] |
BYTES_QUOT |
private java.util.List<java.lang.String> |
closingAttributes |
private boolean |
concealOn |
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| Constructor and Description |
|---|
HtmlAnsiOutputStream(java.io.OutputStream os) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private void |
closeAttributes() |
protected void |
processAttributeRest()
process
SGR 0 corresponding to Reset / Normal |
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. |
void |
write(int data) |
private void |
write(java.lang.String s) |
private void |
writeAttribute(java.lang.String s) |
void |
writeLine(byte[] buf,
int offset,
int len) |
processChangeIconName, processChangeIconNameAndWindowTitle, processChangeWindowTitle, processCharsetSelect, processCursorDown, processCursorDownLine, processCursorLeft, processCursorRight, processCursorTo, processCursorToColumn, processCursorUp, processCursorUpLine, processDefaultBackgroundColor, processDefaultTextColor, processDeleteLine, processEraseLine, processEraseScreen, processInsertLine, processRestoreCursorPosition, processSaveCursorPosition, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColorExt, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColorExt, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommandprivate boolean concealOn
private static final java.lang.String[] ANSI_COLOR_MAP
private static final byte[] BYTES_QUOT
private static final byte[] BYTES_AMP
private static final byte[] BYTES_LT
private static final byte[] BYTES_GT
private final java.util.List<java.lang.String> closingAttributes
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AnsiOutputStreamjava.io.IOExceptionprivate void write(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionprivate void writeAttribute(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionprivate void closeAttributes()
throws java.io.IOException
java.io.IOExceptionpublic void write(int data)
throws java.io.IOException
AnsiOutputStreamwrite in class AnsiOutputStreamjava.io.IOExceptionpublic void writeLine(byte[] buf,
int offset,
int len)
throws java.io.IOException
java.io.IOExceptionprotected void processSetAttribute(int attribute)
throws java.io.IOException
AnsiOutputStreamSGR other than 0 (reset), 30-39 (foreground),
40-49 (background), 90-97 (foreground high intensity) or
100-107 (background high intensity)processSetAttribute in class AnsiOutputStreamattribute - attributejava.io.IOException - IOExceptionAnsiOutputStream.processAttributeRest(),
AnsiOutputStream.processSetForegroundColor(int),
AnsiOutputStream.processSetForegroundColor(int, boolean),
AnsiOutputStream.processSetForegroundColorExt(int),
AnsiOutputStream.processSetForegroundColorExt(int, int, int),
AnsiOutputStream.processDefaultTextColor(),
AnsiOutputStream.processDefaultBackgroundColor()protected void processAttributeRest()
throws java.io.IOException
AnsiOutputStreamSGR 0 corresponding to Reset / NormalprocessAttributeRest in class AnsiOutputStreamjava.io.IOException - IOExceptionprotected void processSetForegroundColor(int color,
boolean bright)
throws java.io.IOException
AnsiOutputStreamSGR 30-37 or SGR 90-97 corresponding to
Set text color (foreground) either in normal mode or high intensity.processSetForegroundColor in class AnsiOutputStreamcolor - the text colorbright - is high intensity?java.io.IOException - IOExceptionprotected void processSetBackgroundColor(int color,
boolean bright)
throws java.io.IOException
AnsiOutputStreamSGR 40-47 or SGR 100-107 corresponding to
Set background color either in normal mode or high intensity.processSetBackgroundColor in class AnsiOutputStreamcolor - the background colorbright - is high intensity?java.io.IOException - IOException