@Beta public final class CountingOutputStream extends java.io.FilterOutputStream
Constructor and Description |
---|
CountingOutputStream(java.io.OutputStream out)
Wraps another output stream, counting the number of bytes written.
|
public CountingOutputStream(java.io.OutputStream out)
out
- the output stream to be wrappedpublic long getCount()
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException