Class AnsiPrintStream

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

    public class AnsiPrintStream
    extends java.io.PrintStream
    Simple PrintStream holding an AnsiOutputStream. This allows changing the mode in which the underlying AnsiOutputStream operates.
    • Constructor Detail

      • AnsiPrintStream

        public AnsiPrintStream​(AnsiOutputStream out,
                               boolean autoFlush)
      • AnsiPrintStream

        public AnsiPrintStream​(AnsiOutputStream out,
                               boolean autoFlush,
                               java.lang.String encoding)
                        throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
    • Method Detail

      • setMode

        public void setMode​(AnsiMode ansiMode)
      • isResetAtUninstall

        public boolean isResetAtUninstall()
      • setResetAtUninstall

        public void setResetAtUninstall​(boolean resetAtClose)
      • getTerminalWidth

        public int getTerminalWidth()
        Returns the width of the terminal associated with this stream or 0.
        Since:
        2.2
      • install

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object