java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.aoapps.hodgepodge.io.ByteCountInputStream
- All Implemented Interfaces:
NoClose
,Closeable
,AutoCloseable
Wraps an InputStream to count the number of bytes transferred.
Does not count bytes skipped.
The counter is not synchronized. Any necessary synchronization
should be externally applied.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
ByteCountInputStream
-
-
Method Details
-
isNoClose
public boolean isNoClose() -
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
getCount
public long getCount()
-