Class DbgTimer.TabbingOutputStream

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

    public static class DbgTimer.TabbingOutputStream
    extends java.io.OutputStream
    A (rather slow) output stream that indents every line of its output
    • Field Summary

      Fields 
      ChangeModifier and Type Field Description
      NEWprotected java.io.OutputStream out  
      NEWprotected int state  
      NEWprotected static int STATE_LINE  
      NEWprotected static int STATE_NOLINE  
      NEWprotected java.util.Stack<java.lang.Long> timeStack  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      ChangeModifier and Type Method Description
      void close()  
      void flush()  
      protected void setTimeStack​(java.util.Stack<java.lang.Long> timeStack)
      Workaround: Set the time stack reference
      NEWprotected void startln()
      Start a new (indented) line of output
      void write​(int b)
      Parses each line and prepends the indentation as they are printed
      • Methods inherited from class java.io.OutputStream

        nullOutputStream, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • out NEW

        protected java.io.OutputStream out
      • state NEW

        protected int state
      • timeStack NEW

        protected java.util.Stack<java.lang.Long> timeStack

Method Detail

  • startln NEW

    protected void startln()
                    throws java.io.IOException
    Start a new (indented) line of output
    Throws:
    java.io.IOException