org.fusesource.jansi
Class WindowsAnsiOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.fusesource.jansi.AnsiOutputStream
              extended by org.fusesource.jansi.WindowsAnsiOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class WindowsAnsiOutputStream
extends AnsiOutputStream

A Windows ANSI escape processor, uses JNA to access native platform API's to change the console attributes.

Since:
1.0
Author:
Hiram Chirino

Field Summary
 
Fields inherited from class org.fusesource.jansi.AnsiOutputStream
ATTRIBUTE_BLINK_FAST, ATTRIBUTE_BLINK_OFF, ATTRIBUTE_BLINK_SLOW, ATTRIBUTE_CONCEAL_OFF, ATTRIBUTE_CONCEAL_ON, ATTRIBUTE_INTENSITY_BOLD, ATTRIBUTE_INTENSITY_FAINT, ATTRIBUTE_INTENSITY_NORMAL, ATTRIBUTE_ITALIC, ATTRIBUTE_NEGATIVE_Off, ATTRIBUTE_NEGATIVE_ON, ATTRIBUTE_UNDERLINE, ATTRIBUTE_UNDERLINE_DOUBLE, ATTRIBUTE_UNDERLINE_OFF, BLACK, BLUE, CYAN, ERASE_LINE, ERASE_LINE_TO_BEGINING, ERASE_LINE_TO_END, ERASE_SCREEN, ERASE_SCREEN_TO_BEGINING, ERASE_SCREEN_TO_END, GREEN, MAGENTA, RED, REST_CODE, WHITE, YELLOW
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
WindowsAnsiOutputStream(OutputStream os)
           
 
Method Summary
protected  void processAttributeRest()
           
protected  void processCursorDown(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 processEraseLine(int eraseOption)
           
protected  void processEraseScreen(int eraseOption)
           
protected  void processRestoreCursorPosition()
           
protected  void processSaveCursorPosition()
           
protected  void processSetAttribute(int attribute)
           
protected  void processSetBackgroundColor(int color)
           
protected  void processSetForegroundColor(int color)
           
 
Methods inherited from class org.fusesource.jansi.AnsiOutputStream
close, processCursorDownLine, processCursorUpLine, processScrollDown, processScrollUp, processUnknownExtension, write
 
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
 

Constructor Detail

WindowsAnsiOutputStream

public WindowsAnsiOutputStream(OutputStream os)
                        throws IOException
Throws:
IOException
Method Detail

processEraseScreen

protected void processEraseScreen(int eraseOption)
                           throws IOException
Overrides:
processEraseScreen in class AnsiOutputStream
Throws:
IOException

processEraseLine

protected void processEraseLine(int eraseOption)
                         throws IOException
Overrides:
processEraseLine in class AnsiOutputStream
Throws:
IOException

processCursorLeft

protected void processCursorLeft(int count)
                          throws IOException
Overrides:
processCursorLeft in class AnsiOutputStream
Throws:
IOException

processCursorRight

protected void processCursorRight(int count)
                           throws IOException
Overrides:
processCursorRight in class AnsiOutputStream
Throws:
IOException

processCursorDown

protected void processCursorDown(int count)
                          throws IOException
Overrides:
processCursorDown in class AnsiOutputStream
Throws:
IOException

processCursorUp

protected void processCursorUp(int count)
                        throws IOException
Overrides:
processCursorUp in class AnsiOutputStream
Throws:
IOException

processCursorTo

protected void processCursorTo(int row,
                               int col)
                        throws IOException
Overrides:
processCursorTo in class AnsiOutputStream
Throws:
IOException

processCursorToColumn

protected void processCursorToColumn(int x)
                              throws IOException
Overrides:
processCursorToColumn in class AnsiOutputStream
Throws:
IOException

processSetForegroundColor

protected void processSetForegroundColor(int color)
                                  throws IOException
Overrides:
processSetForegroundColor in class AnsiOutputStream
Throws:
IOException

processSetBackgroundColor

protected void processSetBackgroundColor(int color)
                                  throws IOException
Overrides:
processSetBackgroundColor in class AnsiOutputStream
Throws:
IOException

processAttributeRest

protected void processAttributeRest()
                             throws IOException
Overrides:
processAttributeRest in class AnsiOutputStream
Throws:
IOException

processSetAttribute

protected void processSetAttribute(int attribute)
                            throws IOException
Overrides:
processSetAttribute in class AnsiOutputStream
Throws:
IOException

processSaveCursorPosition

protected void processSaveCursorPosition()
                                  throws IOException
Overrides:
processSaveCursorPosition in class AnsiOutputStream
Throws:
IOException

processRestoreCursorPosition

protected void processRestoreCursorPosition()
                                     throws IOException
Overrides:
processRestoreCursorPosition in class AnsiOutputStream
Throws:
IOException


Copyright © 2009-2011 Progress Software Inc.. All Rights Reserved.