Class CountingQuietWriter

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

    public class CountingQuietWriter
    extends QuietWriter
    Counts the number of bytes written.
    Since:
    0.8.1
    Author:
    Heinz Richter, heinz.richter@frogdot.com
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long count  
      • Fields inherited from class java.io.FilterWriter

        out
      • Fields inherited from class java.io.Writer

        lock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getCount()  
      void setCount​(long count)  
      void write​(java.lang.String string)  
      • Methods inherited from class java.io.FilterWriter

        close, write, write, write
      • Methods inherited from class java.io.Writer

        append, append, append, nullWriter, write
      • Methods inherited from class java.lang.Object

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

      • count

        protected long count
    • Constructor Detail

      • CountingQuietWriter

        public CountingQuietWriter​(java.io.Writer writer,
                                   ErrorHandler eh)
    • Method Detail

      • write

        public void write​(java.lang.String string)
        Overrides:
        write in class QuietWriter
      • getCount

        public long getCount()
      • setCount

        public void setCount​(long count)