Class ResetablePrinter


  • public class ResetablePrinter
    extends java.lang.Object
    The class implements a resetable char printer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.CharArrayWriter outStream  
    • Constructor Summary

      Constructors 
      Constructor Description
      ResetablePrinter​(int initialCapacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSize()  
      boolean isEmpty()  
      void print​(java.lang.String text)  
      void println​(java.lang.String text)  
      void reset()  
      void writeBufferTo​(java.io.Writer writer)  
      • Methods inherited from class java.lang.Object

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

      • outStream

        private final java.io.CharArrayWriter outStream
    • Constructor Detail

      • ResetablePrinter

        public ResetablePrinter​(int initialCapacity)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • writeBufferTo

        public void writeBufferTo​(java.io.Writer writer)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getSize

        public int getSize()
      • reset

        public void reset()
      • print

        public void print​(java.lang.String text)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • println

        public void println​(java.lang.String text)
                     throws java.io.IOException
        Throws:
        java.io.IOException