Class CountingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.fcrepo.migration.handlers.ocfl.CountingInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CountingInputStream extends InputStream
An class which tracks the amount of bytes read from an InputStream. As this is used primarily to transfer bytes to an OutputStream, we consider these 'bytes processed'.- Author:
- mikejritter
-
-
Constructor Summary
Constructors Constructor Description CountingInputStream(InputStream inner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
CountingInputStream
public CountingInputStream(InputStream inner)
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
readin classInputStream- Throws:
IOException
-
-