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:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class HtmlAnsiOutputStream extends AnsiOutputStream
- Author:
- Daniel Doubrovkine
-
-
Field Summary
-
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, WHITE, YELLOW
-
-
Constructor Summary
Constructors Constructor Description HtmlAnsiOutputStream(java.io.OutputStream os)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voidprocessAttributeRest()processSGR 0corresponding toReset / Normalprotected voidprocessSetAttribute(int attribute)processSGRother than0(reset),30-39(foreground),40-49(background),90-97(foreground high intensity) or100-107(background high intensity)protected voidprocessSetBackgroundColor(int color, boolean bright)processSGR 40-47orSGR 100-107corresponding toSet background coloreither in normal mode or high intensity.protected voidprocessSetForegroundColor(int color, boolean bright)processSGR 30-37orSGR 90-97corresponding toSet text color (foreground)either in normal mode or high intensity.voidwrite(int data)voidwriteLine(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
-
-
-
-
Constructor Detail
-
HtmlAnsiOutputStream
public HtmlAnsiOutputStream(java.io.OutputStream os)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classAnsiOutputStream- Throws:
java.io.IOException
-
write
public void write(int data) throws java.io.IOException
Description copied from class:AnsiOutputStream- Overrides:
writein classAnsiOutputStream- Throws:
java.io.IOException
-
writeLine
public void writeLine(byte[] buf, int offset, int len) throws java.io.IOException
- Throws:
java.io.IOException
-
processSetAttribute
protected void processSetAttribute(int attribute) throws java.io.IOException
Description copied from class:AnsiOutputStreamprocessSGRother than0(reset),30-39(foreground),40-49(background),90-97(foreground high intensity) or100-107(background high intensity)- Overrides:
processSetAttributein classAnsiOutputStream- Parameters:
attribute- attribute- Throws:
java.io.IOException- IOException- See Also:
AnsiOutputStream.processAttributeRest(),AnsiOutputStream.processSetForegroundColor(int),AnsiOutputStream.processSetForegroundColor(int, boolean),AnsiOutputStream.processSetForegroundColorExt(int),AnsiOutputStream.processSetForegroundColorExt(int, int, int),AnsiOutputStream.processDefaultTextColor(),AnsiOutputStream.processDefaultBackgroundColor()
-
processAttributeRest
protected void processAttributeRest() throws java.io.IOException
Description copied from class:AnsiOutputStreamprocessSGR 0corresponding toReset / Normal- Overrides:
processAttributeRestin classAnsiOutputStream- Throws:
java.io.IOException- IOException
-
processSetForegroundColor
protected void processSetForegroundColor(int color, boolean bright) throws java.io.IOException
Description copied from class:AnsiOutputStreamprocessSGR 30-37orSGR 90-97corresponding toSet text color (foreground)either in normal mode or high intensity.- Overrides:
processSetForegroundColorin classAnsiOutputStream- Parameters:
color- the text colorbright- is high intensity?- Throws:
java.io.IOException- IOException
-
processSetBackgroundColor
protected void processSetBackgroundColor(int color, boolean bright) throws java.io.IOException
Description copied from class:AnsiOutputStreamprocessSGR 40-47orSGR 100-107corresponding toSet background coloreither in normal mode or high intensity.- Overrides:
processSetBackgroundColorin classAnsiOutputStream- Parameters:
color- the background colorbright- is high intensity?- Throws:
java.io.IOException- IOException
-
-