Package com.helger.commons.io.stream
Class LoggingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.helger.commons.io.stream.WrappedOutputStream
com.helger.commons.io.stream.LoggingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A wrapper around an
OutputStream that logs what he is doing.- Author:
- Philip Helger
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.helger.commons.io.stream.WrappedOutputStream
getWrappedOutputStreamMethods inherited from class java.io.FilterOutputStream
flush, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
LoggingOutputStream
- Parameters:
aSourceOS- The output stream that should be logged. May not benull.
-
-
Method Details
-
getBytesWritten
- Returns:
- The number of written bytes. Always ≥ 0.
-
onWrite
-
onClose
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classWrappedOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
toString
- Overrides:
toStringin classWrappedOutputStream
-