org.fusesource.jansi
Class AnsiOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.fusesource.jansi.AnsiOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
- Direct Known Subclasses:
- WindowsAnsiOutputStream
public class AnsiOutputStream
- extends java.io.FilterOutputStream
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
Fields inherited from class java.io.FilterOutputStream |
out |
Methods inherited from class java.io.FilterOutputStream |
flush, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REST_CODE
public static final byte[] REST_CODE
ERASE_SCREEN_TO_END
protected static final int ERASE_SCREEN_TO_END
- See Also:
- Constant Field Values
ERASE_SCREEN_TO_BEGINING
protected static final int ERASE_SCREEN_TO_BEGINING
- See Also:
- Constant Field Values
ERASE_SCREEN
protected static final int ERASE_SCREEN
- See Also:
- Constant Field Values
ERASE_LINE_TO_END
protected static final int ERASE_LINE_TO_END
- See Also:
- Constant Field Values
ERASE_LINE_TO_BEGINING
protected static final int ERASE_LINE_TO_BEGINING
- See Also:
- Constant Field Values
ERASE_LINE
protected static final int ERASE_LINE
- See Also:
- Constant Field Values
ATTRIBUTE_INTENSITY_BOLD
protected static final int ATTRIBUTE_INTENSITY_BOLD
- See Also:
- Constant Field Values
ATTRIBUTE_INTENSITY_FAINT
protected static final int ATTRIBUTE_INTENSITY_FAINT
- See Also:
- Constant Field Values
ATTRIBUTE_ITALIC
protected static final int ATTRIBUTE_ITALIC
- See Also:
- Constant Field Values
ATTRIBUTE_UNDERLINE
protected static final int ATTRIBUTE_UNDERLINE
- See Also:
- Constant Field Values
ATTRIBUTE_BLINK_SLOW
protected static final int ATTRIBUTE_BLINK_SLOW
- See Also:
- Constant Field Values
ATTRIBUTE_BLINK_FAST
protected static final int ATTRIBUTE_BLINK_FAST
- See Also:
- Constant Field Values
ATTRIBUTE_NEGATIVE_ON
protected static final int ATTRIBUTE_NEGATIVE_ON
- See Also:
- Constant Field Values
ATTRIBUTE_CONCEAL_ON
protected static final int ATTRIBUTE_CONCEAL_ON
- See Also:
- Constant Field Values
ATTRIBUTE_UNDERLINE_DOUBLE
protected static final int ATTRIBUTE_UNDERLINE_DOUBLE
- See Also:
- Constant Field Values
ATTRIBUTE_INTENSITY_NORMAL
protected static final int ATTRIBUTE_INTENSITY_NORMAL
- See Also:
- Constant Field Values
ATTRIBUTE_UNDERLINE_OFF
protected static final int ATTRIBUTE_UNDERLINE_OFF
- See Also:
- Constant Field Values
ATTRIBUTE_BLINK_OFF
protected static final int ATTRIBUTE_BLINK_OFF
- See Also:
- Constant Field Values
ATTRIBUTE_NEGATIVE_Off
protected static final int ATTRIBUTE_NEGATIVE_Off
- See Also:
- Constant Field Values
ATTRIBUTE_CONCEAL_OFF
protected static final int ATTRIBUTE_CONCEAL_OFF
- See Also:
- Constant Field Values
BLACK
protected static final int BLACK
- See Also:
- Constant Field Values
RED
protected static final int RED
- See Also:
- Constant Field Values
GREEN
protected static final int GREEN
- See Also:
- Constant Field Values
YELLOW
protected static final int YELLOW
- See Also:
- Constant Field Values
BLUE
protected static final int BLUE
- See Also:
- Constant Field Values
MAGENTA
protected static final int MAGENTA
- See Also:
- Constant Field Values
CYAN
protected static final int CYAN
- See Also:
- Constant Field Values
WHITE
protected static final int WHITE
- See Also:
- Constant Field Values
AnsiOutputStream
public AnsiOutputStream(java.io.OutputStream os)
write
public void write(int data)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
processRestoreCursorPosition
protected void processRestoreCursorPosition()
throws java.io.IOException
- Throws:
java.io.IOException
processSaveCursorPosition
protected void processSaveCursorPosition()
throws java.io.IOException
- Throws:
java.io.IOException
processScrollDown
protected void processScrollDown(int optionInt)
throws java.io.IOException
- Throws:
java.io.IOException
processScrollUp
protected void processScrollUp(int optionInt)
throws java.io.IOException
- Throws:
java.io.IOException
processEraseScreen
protected void processEraseScreen(int eraseOption)
throws java.io.IOException
- Throws:
java.io.IOException
processEraseLine
protected void processEraseLine(int eraseOption)
throws java.io.IOException
- Throws:
java.io.IOException
processSetAttribute
protected void processSetAttribute(int attribute)
throws java.io.IOException
- Throws:
java.io.IOException
processSetForegroundColor
protected void processSetForegroundColor(int color)
throws java.io.IOException
- Throws:
java.io.IOException
processSetBackgroundColor
protected void processSetBackgroundColor(int color)
throws java.io.IOException
- Throws:
java.io.IOException
processAttributeRest
protected void processAttributeRest()
throws java.io.IOException
- Throws:
java.io.IOException
processCursorTo
protected void processCursorTo(int row,
int col)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorToColumn
protected void processCursorToColumn(int x)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorUpLine
protected void processCursorUpLine(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorDownLine
protected void processCursorDownLine(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorLeft
protected void processCursorLeft(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorRight
protected void processCursorRight(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorDown
protected void processCursorDown(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processCursorUp
protected void processCursorUp(int count)
throws java.io.IOException
- Throws:
java.io.IOException
processUnknownExtension
protected void processUnknownExtension(java.util.ArrayList<java.lang.Object> options,
int command)
processChangeIconNameAndWindowTitle
protected void processChangeIconNameAndWindowTitle(java.lang.String label)
processChangeIconName
protected void processChangeIconName(java.lang.String label)
processChangeWindowTitle
protected void processChangeWindowTitle(java.lang.String label)
processUnknownOperatingSystemCommand
protected void processUnknownOperatingSystemCommand(int command,
java.lang.String param)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterOutputStream
- Throws:
java.io.IOException