Package com.helger.commons.io.stream
Class CountingReader
java.lang.Object
java.io.Reader
java.io.FilterReader
com.helger.commons.io.stream.WrappedReader
com.helger.commons.io.stream.CountingReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
A wrapper around a
Reader that counts the number of read bytes.- Since:
- 9.3.8
- Author:
- Philip Helger
-
Field Summary
Fields inherited from class java.io.FilterReader
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.helger.commons.io.stream.WrappedReader
getWrappedReaderMethods inherited from class java.io.FilterReader
close, markSupported, readyMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
CountingReader
-
-
Method Details
-
read
- Overrides:
readin classFilterReader- Throws:
IOException
-
read
- Overrides:
readin classFilterReader- Throws:
IOException
-
skip
- Overrides:
skipin classFilterReader- Throws:
IOException
-
mark
- Overrides:
markin classFilterReader- Throws:
IOException
-
reset
- Overrides:
resetin classFilterReader- Throws:
IOException
-
getCharsRead
- Returns:
- The number of read chars.
-
getPosition
- Returns:
- The current position in the input stream (taking skip and mark/reset into account)
-
getMark
- Returns:
- The current mark
-
toString
- Overrides:
toStringin classWrappedReader
-