Class CountingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.common.io.CountingInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
An 
InputStream that counts the number of bytes read.- Since:
- 1.0
- Author:
- Chris Nokleberg
- 
Field SummaryFields inherited from class java.io.FilterInputStreamin
- 
Constructor SummaryConstructorsConstructorDescriptionWraps another input stream, counting the number of bytes read.
- 
Method SummaryMethods inherited from class java.io.FilterInputStreamavailable, close, markSupported, readMethods inherited from class java.io.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
- 
Constructor Details- 
CountingInputStreamWraps another input stream, counting the number of bytes read.- Parameters:
- in- the input stream to be wrapped
 
 
- 
- 
Method Details- 
getCountpublic long getCount()Returns the number of bytes read.
- 
read- Overrides:
- readin class- FilterInputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- FilterInputStream
- Throws:
- IOException
 
- 
skip- Overrides:
- skipin class- FilterInputStream
- Throws:
- IOException
 
- 
markpublic void mark(int readlimit) - Overrides:
- markin class- FilterInputStream
 
- 
reset- Overrides:
- resetin class- FilterInputStream
- Throws:
- IOException
 
 
-