Package com.helger.commons.io.stream
Class LoggingReader
java.lang.Object
java.io.Reader
java.io.FilterReader
com.helger.commons.io.stream.WrappedReader
com.helger.commons.io.stream.LoggingReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
A wrapper around an
Reader that logs read and skip actions.- Since:
- 9.3.8
- Author:
- Philip Helger
-
Field Summary
Fields inherited from class java.io.FilterReader
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()final longfinal voidmark(int nReadlimit) protected voidonClose(long nCurrentPosition) protected voidonMark(int nReadLimit, long nCurrentPosition) protected voidonRead(int nBytesRead, long nNewPosition) protected voidonReset(long nCurrentPosition) protected voidonSkip(long nBytesSkipped, long nNewPosition) final intread()final intread(char[] aBuf, int nOffset, int nLength) final voidreset()final longskip(long n) toString()Methods inherited from class com.helger.commons.io.stream.WrappedReader
getWrappedReaderMethods inherited from class java.io.FilterReader
markSupported, readyMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
LoggingReader
- Parameters:
aSourceReader- The reader that should be logged. May not benull.
-
-
Method Details
-
getPosition
public final long getPosition()- Returns:
- The current read position. Always ≥ 0.
-
onRead
-
onSkip
-
onMark
-
onReset
-
onClose
-
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
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterReader- Throws:
IOException
-
toString
- Overrides:
toStringin classWrappedReader
-