-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class CountingInputStream extends FilterInputStream
An InputStream counting the number of bytes read from a wrapped inputStream.
-
-
Field Summary
Fields Modifier and Type Field Description private Longcountprivate final InputStreamin
-
Constructor Summary
Constructors Constructor Description CountingInputStream(InputStream inputStream, Long initialCount)
-
Method Summary
Modifier and Type Method Description final LonggetCount()final UnitsetCount(Long count)Integerread()Integerread(ByteArray b, Integer off, Integer len)Longskip(Long n)Unitmark(Integer readlimit)Unitreset()final ByteArrayreadRange(LongRange range)-
Methods inherited from class org.readium.r2.shared.util.io.CountingInputStream
available, close, markSupported, read -
Methods inherited from class java.io.FilterInputStream
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 inputStream, Long initialCount)
-
-
-
-