Class CountingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.compress.utils.CountingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Input stream that tracks the number of bytes read.
- Since:
- 1.3
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
CountingInputStream
-
-
Method Details
-
getBytesRead
public long getBytesRead()Returns the current number of bytes read from this stream.- Returns:
- the number of read bytes
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-