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

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
  • Field Details

  • Constructor Details

    • AnsiOutputStream

      public AnsiOutputStream(OutputStream os)
  • Method Details

    • 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
    • processSetForegroundColor

      protected void processSetForegroundColor(int color, boolean bright) throws IOException
      Throws:
      IOException
    • processSetForegroundColorExt

      protected void processSetForegroundColorExt(int paletteIndex) throws IOException
      Throws:
      IOException
    • processSetForegroundColorExt

      protected void processSetForegroundColorExt(int r, int g, int b) throws IOException
      Throws:
      IOException
    • processSetBackgroundColor

      protected void processSetBackgroundColor(int color) throws IOException
      Throws:
      IOException
    • processSetBackgroundColor

      protected void processSetBackgroundColor(int color, boolean bright) throws IOException
      Throws:
      IOException
    • processSetBackgroundColorExt

      protected void processSetBackgroundColorExt(int paletteIndex) throws IOException
      Throws:
      IOException
    • processSetBackgroundColorExt

      protected void processSetBackgroundColorExt(int r, int g, int b) throws IOException
      Throws:
      IOException
    • processDefaultTextColor

      protected void processDefaultTextColor() throws IOException
      Throws:
      IOException
    • processDefaultBackgroundColor

      protected void processDefaultBackgroundColor() 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)
    • processCharsetSelect

      protected void processCharsetSelect(int set, char seq)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class FilterOutputStream
      Throws:
      IOException