public class CountingOutputStream extends FilterOutputStream
out| Constructor and Description |
|---|
CountingOutputStream(OutputStream
|
| 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)
|
close, flushpublic CountingOutputStream(OutputStreamout)
public void write(int b)
throws IOException
write in class
FilterOutputStream
IOException
public void write(byte[] b)
throws IOException
write in class
FilterOutputStream
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class
FilterOutputStream
IOException
protected void count(long written)
written - the number of bytes written
public long getBytesWritten()