Class CountingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
net.adoptopenjdk.icedteaweb.resources.downloader.CountingInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
NotifyingInputStream
InputStream decorator which reads the number of bytes read.
-
Field Summary
FieldsFields inherited from class FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FilterInputStream
available, close, markSupported, readMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
count
private long count
-
-
Constructor Details
-
CountingInputStream
CountingInputStream(InputStream delegate)
-
-
Method Details
-
numBytesRead
long numBytesRead()- Returns:
- the number of bytes read.
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-