public class CountingOutputStream
extends java.io.FilterOutputStream
| Constructor and Description |
|---|
CountingOutputStream(java.io.OutputStream out)
Constructs a new
FilterOutputStream with out as its target stream. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getCount()
Returns the number of bytes written.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public CountingOutputStream(java.io.OutputStream out)
FilterOutputStream with out as its target stream.out - the target stream that this stream writes to.public long getCount()
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOException