Class SizeCountingInputStream
java.lang.Object
java.io.InputStream
org.jgroups.util.SizeCountingInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Wraps another input stream and counts the bytes it reads from it. Contrary to
SizeCountingOutputStream, this
class delegates reads to the wrapped inputstream.- Since:
- 5.5.3
- Author:
- Bela Ban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
in
-
position
protected int position
-
-
Constructor Details
-
SizeCountingInputStream
-
-
Method Details
-
position
public int position() -
position
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
toString
-