Package com.helger.commons.io.stream
Class CountingFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FileInputStream
-
- com.helger.commons.io.stream.CountingFileInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CountingFileInputStream extends FileInputStream
A specialFileInputStreamsub class that keeps track of all read bytes for the statistics handler.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description CountingFileInputStream(File aFile)CountingFileInputStream(String sFilename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread()intread(byte[] b)intread(byte[] b, int nOffset, int nLength)-
Methods inherited from class java.io.FileInputStream
available, close, finalize, getChannel, getFD, skip
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
Constructor Detail
-
CountingFileInputStream
public CountingFileInputStream(@Nonnull File aFile) throws FileNotFoundException
- Throws:
FileNotFoundException
-
CountingFileInputStream
public CountingFileInputStream(@Nonnull String sFilename) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classFileInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classFileInputStream- Throws:
IOException
-
read
public int read(byte[] b, int nOffset, int nLength) throws IOException- Overrides:
readin classFileInputStream- Throws:
IOException
-
-