public class CountOutputStream extends OutputStream
OutputStream
implementation that delegates all method calls to a provided OutputStream while timing all method calls and counting how many
bytes are written by this OutputStream.| Constructor and Description |
|---|
CountOutputStream(OutputStream os)
Constructs a new CountOutputStream that delegates to the given
OutputStream. |
public CountOutputStream(OutputStream os)
OutputStream.os - the delegate OutputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOException