public class ByteCountingOutputStream
extends org.apache.commons.io.output.ProxyOutputStream
| Modifier and Type | Field and Description |
|---|---|
private Counter |
byteCounter |
| Constructor and Description |
|---|
ByteCountingOutputStream(java.io.OutputStream out,
Counter counter)
Constructs a ByteCountingOutputStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
private final Counter byteCounter
public ByteCountingOutputStream(java.io.OutputStream out,
Counter counter)
out - OutputStream to be wrappedcounter - PCP metric counter to be updatedpublic void write(byte[] b)
throws java.io.IOException
write in class org.apache.commons.io.output.ProxyOutputStreamjava.io.IOExceptionOutputStream.write(byte[])public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class org.apache.commons.io.output.ProxyOutputStreamjava.io.IOExceptionOutputStream.write(byte[], int, int)public void write(int b)
throws java.io.IOException
write in class org.apache.commons.io.output.ProxyOutputStreamjava.io.IOExceptionOutputStream.write(int)