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 intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intstatic final byte[]protected static final intprotected static final intFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidprotected voidprocessChangeIconName(String label) protected voidprotected voidprocessChangeWindowTitle(String label) protected voidprocessCharsetSelect(int set, char seq) protected voidprocessCursorDown(int count) protected voidprocessCursorDownLine(int count) protected voidprocessCursorLeft(int count) protected voidprocessCursorRight(int count) protected voidprocessCursorTo(int row, int col) protected voidprocessCursorToColumn(int x) protected voidprocessCursorUp(int count) protected voidprocessCursorUpLine(int count) protected voidprotected voidprotected voidprocessEraseLine(int eraseOption) protected voidprocessEraseScreen(int eraseOption) protected voidprotected voidprotected voidprocessScrollDown(int optionInt) protected voidprocessScrollUp(int optionInt) protected voidprocessSetAttribute(int attribute) protected voidprocessSetBackgroundColor(int color) protected voidprocessSetBackgroundColor(int color, boolean bright) protected voidprocessSetBackgroundColorExt(int paletteIndex) protected voidprocessSetBackgroundColorExt(int r, int g, int b) protected voidprocessSetForegroundColor(int color) protected voidprocessSetForegroundColor(int color, boolean bright) protected voidprocessSetForegroundColorExt(int paletteIndex) protected voidprocessSetForegroundColorExt(int r, int g, int b) protected voidprocessUnknownExtension(ArrayList<Object> options, int command) protected voidprocessUnknownOperatingSystemCommand(int command, String param) voidwrite(int data) Methods inherited from class java.io.FilterOutputStream
flush, write, writeMethods 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:
writein 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-