org.fusesource.jansi
Class AnsiOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.fusesource.jansi.AnsiOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
- Direct Known Subclasses:
- WindowsAnsiOutputStream
public class AnsiOutputStream
- extends 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
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(OutputStream os)
write
public void write(int data)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
processRestoreCursorPosition
protected void processRestoreCursorPosition()
throws IOException
- Throws:
IOException
processSaveCursorPosition
protected void processSaveCursorPosition()
throws IOException
- Throws:
IOException
processScrollDown
protected void processScrollDown(int optionInt)
throws IOException
- Throws:
IOException
processScrollUp
protected void processScrollUp(int optionInt)
throws IOException
- Throws:
IOException
processEraseScreen
protected void processEraseScreen(int eraseOption)
throws IOException
- Throws:
IOException
processEraseLine
protected void processEraseLine(int eraseOption)
throws IOException
- Throws:
IOException
processSetAttribute
protected void processSetAttribute(int attribute)
throws IOException
- Throws:
IOException
processSetForegroundColor
protected void processSetForegroundColor(int color)
throws IOException
- Throws:
IOException
processSetBackgroundColor
protected void processSetBackgroundColor(int color)
throws IOException
- Throws:
IOException
processAttributeRest
protected void processAttributeRest()
throws IOException
- Throws:
IOException
processCursorTo
protected void processCursorTo(int row,
int col)
throws IOException
- Throws:
IOException
processCursorToColumn
protected void processCursorToColumn(int x)
throws IOException
- Throws:
IOException
processCursorUpLine
protected void processCursorUpLine(int count)
throws IOException
- Throws:
IOException
processCursorDownLine
protected void processCursorDownLine(int count)
throws IOException
- Throws:
IOException
processCursorLeft
protected void processCursorLeft(int count)
throws IOException
- Throws:
IOException
processCursorRight
protected void processCursorRight(int count)
throws IOException
- Throws:
IOException
processCursorDown
protected void processCursorDown(int count)
throws IOException
- Throws:
IOException
processCursorUp
protected void processCursorUp(int count)
throws IOException
- Throws:
IOException
processUnknownExtension
protected void processUnknownExtension(ArrayList<Object> options,
int command)
processChangeIconNameAndWindowTitle
protected void processChangeIconNameAndWindowTitle(String label)
processChangeIconName
protected void processChangeIconName(String label)
processChangeWindowTitle
protected void processChangeWindowTitle(String label)
processUnknownOperatingSystemCommand
protected void processUnknownOperatingSystemCommand(int command,
String param)
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class FilterOutputStream
- Throws:
IOException
Copyright © 2009-2012 FuseSource, Corp.. All Rights Reserved.