public class LoggingInputStream extends WrappedInputStream
InputStream that logs read and skip actions.in| Constructor and Description |
|---|
LoggingInputStream(InputStream aSourceIS) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPosition() |
void |
mark(int nReadlimit) |
protected void |
onClose(long nCurrentPosition) |
protected void |
onMark(int nReadLimit,
long nCurrentPosition) |
protected void |
onRead(int nBytesRead,
long nNewPosition) |
protected void |
onReset(long nCurrentPosition) |
protected void |
onSkip(long nBytesSkipped,
long nNewPosition) |
int |
read() |
int |
read(byte[] aBuf,
int nOffset,
int nLength) |
void |
reset() |
long |
skip(long n) |
String |
toString() |
getWrappedInputStreamavailable, markSupported, readpublic LoggingInputStream(@Nonnull InputStream aSourceIS)
aSourceIS - The input stream to be logged. May not be null.public final long getPosition()
@OverrideOnDemand protected void onRead(int nBytesRead, long nNewPosition)
@OverrideOnDemand protected void onSkip(long nBytesSkipped, long nNewPosition)
@OverrideOnDemand protected void onMark(int nReadLimit, long nCurrentPosition)
@OverrideOnDemand protected void onReset(long nCurrentPosition)
@OverrideOnDemand protected void onClose(long nCurrentPosition)
public final int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic final int read(byte[] aBuf,
int nOffset,
int nLength)
throws IOException
read in class FilterInputStreamIOExceptionpublic final long skip(@Nonnegative long n) throws IOException
skip in class FilterInputStreamIOExceptionpublic final void mark(@Nonnegative int nReadlimit)
mark in class FilterInputStreampublic final void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic String toString()
toString in class WrappedInputStreamCopyright © 2014–2022 Philip Helger. All rights reserved.