public class LoggingOutputStream extends WrappedOutputStream
OutputStream that logs what he is doing.out| Constructor and Description |
|---|
LoggingOutputStream(OutputStream aSourceOS) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBytesWritten() |
protected void |
onClose(long nTotalBytesWritten) |
protected void |
onWrite(int nBytesWritten,
long nTotalBytesWritten) |
String |
toString() |
void |
write(byte[] aBuf,
int nOfs,
int nLen) |
void |
write(int b) |
getWrappedOutputStreamflush, writepublic LoggingOutputStream(@Nonnull OutputStream aSourceOS)
aSourceOS - The output stream that should be logged. May not be
null.@Nonnegative public final long getBytesWritten()
@OverrideOnDemand protected void onWrite(@Nonnegative int nBytesWritten, long nTotalBytesWritten)
@OverrideOnDemand protected void onClose(long nTotalBytesWritten)
public final void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic final void write(@Nonnull byte[] aBuf, int nOfs, int nLen) throws IOException
write in class WrappedOutputStreamIOExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic String toString()
toString in class WrappedOutputStreamCopyright © 2014–2022 Philip Helger. All rights reserved.