public class CountingOutputStream extends FilterOutputStream
out
Constructor and Description |
---|
CountingOutputStream(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) |
close, flush
public CountingOutputStream(OutputStream out)
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 writtenpublic long getBytesWritten()
Copyright © 2016 The Apache Software Foundation. All rights reserved.