Package org.fusesource.jansi
Class HtmlAnsiOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.fusesource.jansi.AnsiOutputStream
org.fusesource.jansi.HtmlAnsiOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private boolean
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
protected void
processSGR 0
corresponding toReset / Normal
protected void
processSetAttribute
(int attribute) 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) processSGR 40-47
orSGR 100-107
corresponding toSet background color
either in normal mode or high intensity.protected void
processSetForegroundColor
(int color, boolean bright) processSGR 30-37
orSGR 90-97
corresponding toSet text color (foreground)
either in normal mode or high intensity.void
write
(int data) private void
private void
void
writeLine
(byte[] buf, int offset, int len) Methods inherited from class org.fusesource.jansi.AnsiOutputStream
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, processUnknownOperatingSystemCommand
Methods inherited from class java.io.FilterOutputStream
flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
concealOn
private boolean concealOn -
ANSI_COLOR_MAP
-
BYTES_QUOT
private static final byte[] BYTES_QUOT -
BYTES_AMP
private static final byte[] BYTES_AMP -
BYTES_LT
private static final byte[] BYTES_LT -
BYTES_GT
private static final byte[] BYTES_GT -
closingAttributes
-
-
Constructor Details
-
HtmlAnsiOutputStream
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAnsiOutputStream
- Throws:
IOException
-
write
- Throws:
IOException
-
writeAttribute
- Throws:
IOException
-
closeAttributes
- Throws:
IOException
-
write
Description copied from class:AnsiOutputStream
- Overrides:
write
in classAnsiOutputStream
- Throws:
IOException
-
writeLine
- Throws:
IOException
-
processSetAttribute
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:
-
processAttributeRest
Description copied from class:AnsiOutputStream
processSGR 0
corresponding toReset / Normal
- Overrides:
processAttributeRest
in classAnsiOutputStream
- Throws:
IOException
- IOException
-
processSetForegroundColor
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
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
-