Package i2p.susi.util
Class CountingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
i2p.susi.util.CountingInputStream
- All Implemented Interfaces:
ReadCounter,Closeable,AutoCloseable
- Direct Known Subclasses:
LimitInputStream
public class CountingInputStream extends FilterInputStream implements ReadCounter
An InputStream that implements ReadCounter.
- Since:
- 0.9.34
-
Field Summary
Fields Modifier and Type Field Description protected longcount -
Constructor Summary
Constructors Constructor Description CountingInputStream(InputStream in) -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, resetMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
count
protected long count
-
-
Constructor Details
-
Method Details
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
getRead
public long getRead()Description copied from interface:ReadCounterThe total number of bytes that have been read or skipped- Specified by:
getReadin interfaceReadCounter
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-