Package org.apfloat

Class FormattingHelper.CountWriter

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

    private static class FormattingHelper.CountWriter
    extends java.io.FilterWriter
    • Field Summary

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

        out
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      CountWriter​(java.io.Writer out)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count()  
      void write​(char[] buffer, int offset, int length)  
      void write​(int c)  
      void write​(java.lang.String text, int offset, int length)  
      • Methods inherited from class java.io.FilterWriter

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

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

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

      • count

        private long count
    • Constructor Detail

      • CountWriter

        public CountWriter​(java.io.Writer out)
    • Method Detail

      • write

        public void write​(int c)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterWriter
        Throws:
        java.io.IOException
      • write

        public void write​(char[] buffer,
                          int offset,
                          int length)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterWriter
        Throws:
        java.io.IOException
      • write

        public void write​(java.lang.String text,
                          int offset,
                          int length)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterWriter
        Throws:
        java.io.IOException
      • count

        public long count()