Class ByteCountInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
fr.ens.biologie.genomique.eoulsan.io.ByteCountInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This filter class allow to count the number of bytes read by an inputStream.
- Since:
- 1.0
- Author:
- Laurent Jourdren
-
Constructor Summary
ConstructorsConstructorDescriptionPublic constructorByteCountInputStream(InputStream is, long attemptNRead) Public constructor -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, mark, markSupportedMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ByteCountInputStream
Public constructor- Parameters:
is- inputStream
-
ByteCountInputStream
Public constructor- Parameters:
is- inputStreamattemptNRead- attempt read count
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
getBytesRead
public long getBytesRead()Get the number of bytes read.- Returns:
- the number of bytes read
-