-
- 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 longbytesRead
-
Constructor Summary
Constructors Constructor Description CountingInputStream(InputStream in)
-
Method Summary
Modifier and Type Method Description longgetBytesRead()Returns the current number of bytes read from this stream. intread()intread(Array<byte> b)intread(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)
-
-
-
-