org.apache.commons.io.output
Class CountingOutputStream
public class CountingOutputStream
Used in debugging, it counts the number of bytes that pass
through it.
$Id: CountingOutputStream.java 155419 2005-02-26 13:02:41Z dirkv $
int | getCount() - The number of bytes that have passed through this stream.
|
int | resetCount() - Set the count back to 0.
|
void | write(byte[] b)
|
void | write(byte[] b, int off, int len)
|
void | write(int b)
|
CountingOutputStream
public CountingOutputStream(OutputStream out)
Constructs a CountingOutputStream.
out
- the OutputStream to write to
getCount
public int getCount()
The number of bytes that have passed through this stream.
- the number of bytes accumulated
resetCount
public int resetCount()
Set the count back to 0.
- the count previous to resetting.
write
public void write(byte[] b)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(byte[])
write
public void write(byte[] b,
int off,
int len)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(byte[], int, int)
write
public void write(int b)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(int)