Package hudson.plugins.ansicolor
Class AnsiOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
hudson.plugins.ansicolor.AnsiOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
AnsiHtmlOutputStream
A ANSI output stream extracts ANSI escape codes written to
an output stream.
For more information about ANSI escape codes, see:
http://en.wikipedia.org/wiki/ANSI_escape_code
This class just filters out the escape codes so that they are not
sent out to the underlying OutputStream. Subclasses should
actually perform the ANSI escape behaviors.
- Since:
- 1.0
- Author:
- Hiram Chirino, Joris Kuipers
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
static final byte[]
protected static final int
protected static final int
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
protected void
processChangeIconName
(String label) protected void
protected void
processChangeWindowTitle
(String label) protected void
processCharsetSelect
(int set, char seq) protected void
processCursorDown
(int count) protected void
processCursorDownLine
(int count) protected void
processCursorLeft
(int count) protected void
processCursorRight
(int count) protected void
processCursorTo
(int row, int col) protected void
processCursorToColumn
(int x) protected void
processCursorUp
(int count) protected void
processCursorUpLine
(int count) protected void
protected void
protected void
processEraseLine
(int eraseOption) protected void
processEraseScreen
(int eraseOption) protected void
protected void
protected void
processScrollDown
(int optionInt) protected void
processScrollUp
(int optionInt) protected void
processSetAttribute
(int attribute) protected void
processSetBackgroundColor
(int color) protected void
processSetBackgroundColor
(int color, boolean bright) protected void
processSetBackgroundColorExt
(int paletteIndex) protected void
processSetBackgroundColorExt
(int r, int g, int b) protected void
processSetForegroundColor
(int color) protected void
processSetForegroundColor
(int color, boolean bright) protected void
processSetForegroundColorExt
(int paletteIndex) protected void
processSetForegroundColorExt
(int r, int g, int b) protected void
processUnknownExtension
(ArrayList<Object> options, int command) protected void
processUnknownOperatingSystemCommand
(int command, String param) void
write
(int data) Methods inherited from class java.io.FilterOutputStream
flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
REST_CODE
public static final byte[] REST_CODE -
ERASE_SCREEN_TO_END
protected static final int ERASE_SCREEN_TO_END- See Also:
-
ERASE_SCREEN_TO_BEGINING
protected static final int ERASE_SCREEN_TO_BEGINING- See Also:
-
ERASE_SCREEN
protected static final int ERASE_SCREEN- See Also:
-
ERASE_LINE_TO_END
protected static final int ERASE_LINE_TO_END- See Also:
-
ERASE_LINE_TO_BEGINING
protected static final int ERASE_LINE_TO_BEGINING- See Also:
-
ERASE_LINE
protected static final int ERASE_LINE- See Also:
-
ATTRIBUTE_INTENSITY_BOLD
protected static final int ATTRIBUTE_INTENSITY_BOLD- See Also:
-
ATTRIBUTE_INTENSITY_FAINT
protected static final int ATTRIBUTE_INTENSITY_FAINT- See Also:
-
ATTRIBUTE_ITALIC
protected static final int ATTRIBUTE_ITALIC- See Also:
-
ATTRIBUTE_UNDERLINE
protected static final int ATTRIBUTE_UNDERLINE- See Also:
-
ATTRIBUTE_BLINK_SLOW
protected static final int ATTRIBUTE_BLINK_SLOW- See Also:
-
ATTRIBUTE_BLINK_FAST
protected static final int ATTRIBUTE_BLINK_FAST- See Also:
-
ATTRIBUTE_NEGATIVE_ON
protected static final int ATTRIBUTE_NEGATIVE_ON- See Also:
-
ATTRIBUTE_CONCEAL_ON
protected static final int ATTRIBUTE_CONCEAL_ON- See Also:
-
ATTRIBUTE_UNDERLINE_DOUBLE
protected static final int ATTRIBUTE_UNDERLINE_DOUBLE- See Also:
-
ATTRIBUTE_INTENSITY_NORMAL
protected static final int ATTRIBUTE_INTENSITY_NORMAL- See Also:
-
ATTRIBUTE_UNDERLINE_OFF
protected static final int ATTRIBUTE_UNDERLINE_OFF- See Also:
-
ATTRIBUTE_BLINK_OFF
protected static final int ATTRIBUTE_BLINK_OFF- See Also:
-
ATTRIBUTE_NEGATIVE_Off
protected static final int ATTRIBUTE_NEGATIVE_Off- See Also:
-
ATTRIBUTE_CONCEAL_OFF
protected static final int ATTRIBUTE_CONCEAL_OFF- See Also:
-
BLACK
protected static final int BLACK- See Also:
-
RED
protected static final int RED- See Also:
-
GREEN
protected static final int GREEN- See Also:
-
YELLOW
protected static final int YELLOW- See Also:
-
BLUE
protected static final int BLUE- See Also:
-
MAGENTA
protected static final int MAGENTA- See Also:
-
CYAN
protected static final int CYAN- See Also:
-
WHITE
protected static final int WHITE- See Also:
-
-
Constructor Details
-
AnsiOutputStream
-
-
Method Details
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
processRestoreCursorPosition
- Throws:
IOException
-
processSaveCursorPosition
- Throws:
IOException
-
processScrollDown
- Throws:
IOException
-
processScrollUp
- Throws:
IOException
-
processEraseScreen
- Throws:
IOException
-
processEraseLine
- Throws:
IOException
-
processSetAttribute
- Throws:
IOException
-
processSetForegroundColor
- Throws:
IOException
-
processSetForegroundColor
- Throws:
IOException
-
processSetForegroundColorExt
- Throws:
IOException
-
processSetForegroundColorExt
- Throws:
IOException
-
processSetBackgroundColor
- Throws:
IOException
-
processSetBackgroundColor
- Throws:
IOException
-
processSetBackgroundColorExt
- Throws:
IOException
-
processSetBackgroundColorExt
- Throws:
IOException
-
processDefaultTextColor
- Throws:
IOException
-
processDefaultBackgroundColor
- Throws:
IOException
-
processAttributeRest
- Throws:
IOException
-
processCursorTo
- Throws:
IOException
-
processCursorToColumn
- Throws:
IOException
-
processCursorUpLine
- Throws:
IOException
-
processCursorDownLine
- Throws:
IOException
-
processCursorLeft
- Throws:
IOException
-
processCursorRight
- Throws:
IOException
-
processCursorDown
- Throws:
IOException
-
processCursorUp
- Throws:
IOException
-
processUnknownExtension
-
processChangeIconNameAndWindowTitle
-
processChangeIconName
-
processChangeWindowTitle
-
processUnknownOperatingSystemCommand
-
processCharsetSelect
protected void processCharsetSelect(int set, char seq) -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-