Package com.helger.commons.io.stream
Class CountingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.helger.commons.io.stream.WrappedOutputStream
com.helger.commons.io.stream.CountingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A wrapper around an
OutputStream that counts the number of read
bytes.- 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
close, flush, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
CountingOutputStream
-
-
Method Details
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classWrappedOutputStream- Throws:
IOException
-
getBytesWritten
- Returns:
- The number of written bytes.
-
toString
- Overrides:
toStringin classWrappedOutputStream
-