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 void
close()
protected void
processAttributeRest()
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)
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
-
-
-
-
Constructor Detail
-
HtmlAnsiOutputStream
public HtmlAnsiOutputStream(java.io.OutputStream os)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classAnsiOutputStream
- Throws:
java.io.IOException
-
write
public void write(int data) throws java.io.IOException
Description copied from class:AnsiOutputStream
- Overrides:
write
in 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: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:
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:AnsiOutputStream
processSGR 0
corresponding toReset / Normal
- Overrides:
processAttributeRest
in classAnsiOutputStream
- Throws:
java.io.IOException
- IOException
-
processSetForegroundColor
protected void processSetForegroundColor(int color, boolean bright) throws java.io.IOException
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:
java.io.IOException
- IOException
-
processSetBackgroundColor
protected void processSetBackgroundColor(int color, boolean bright) throws java.io.IOException
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:
java.io.IOException
- IOException
-
-