Package 

Class CountingInputStream

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

    
    public class CountingInputStream
    extends FilterInputStream
                        

    Input stream that tracks the number of bytes read.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long bytesRead
    • Method Summary

      Modifier and Type Method Description
      long getBytesRead() Returns the current number of bytes read from this stream.
      int read()
      int read(Array<byte> b)
      int read(Array<byte> b, int off, int len)
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • CountingInputStream

        CountingInputStream(InputStream in)
    • Method Detail

      • getBytesRead

         long getBytesRead()

        Returns the current number of bytes read from this stream.

      • read

         int read(Array<byte> b, int off, int len)