public class CountingOutputStream
extends java.io.FilterOutputStream
| Constructor and Description |
|---|
CountingOutputStream(java.io.OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
count(long written)
Increments the counter of already written bytes.
|
long |
getBytesWritten()
Returns the current number of bytes written to this stream.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionprotected void count(long written)
written - the number of bytes writtenpublic long getBytesWritten()