Class AnsiOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class AnsiOutputStream
    extends java.io.FilterOutputStream
    A ANSI print stream extracts ANSI escape codes written to an output stream and calls corresponding AnsiProcessor.process* methods. This particular class is not synchronized for improved performances.

    For more information about ANSI escape codes, see Wikipedia article

    Since:
    1.0
    See Also:
    AnsiProcessor
    • Field Detail

      • RESET_CODE

        public static final byte[] RESET_CODE
    • Method Detail

      • getTerminalWidth

        public int getTerminalWidth()
      • setMode

        public final void setMode​(AnsiMode mode)
      • isResetAtUninstall

        public boolean isResetAtUninstall()
      • setResetAtUninstall

        public void setResetAtUninstall​(boolean resetAtUninstall)
      • write

        public void write​(int data)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • install

        public void install()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • uninstall

        public void uninstall()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • close

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