|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
ariba.util.io.StatsOutputStream
public class StatsOutputStream
StatsOutputStream is an OutputStream that keeps track of the number of bytes that have been written.
OutputStream
Field Summary | |
---|---|
long |
count
Number of bytes written. |
Constructor Summary | |
---|---|
StatsOutputStream(java.io.OutputStream base)
Creates a StatsOutputStream. |
Method Summary | |
---|---|
void |
close()
Closes the stream. |
void |
flush()
Flushes the stream. |
void |
write(byte[] b)
Writes an array of bytes. |
void |
write(byte[] b,
int off,
int len)
Writes a sub array of bytes. |
void |
write(int b)
Writes a byte. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public long count
Constructor Detail |
---|
public StatsOutputStream(java.io.OutputStream base)
base
- the OutputStreamMethod Detail |
---|
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the byte
java.io.IOException
- If an I/O error has occurred.public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the data to be written
java.io.IOException
- If an I/O error has occurred.public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
b
- the data to be writtenoff
- the start offset in the datalen
- the number of bytes that are written
java.io.IOException
- If an I/O error has occurred.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- If an I/O error has occurred.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- If an I/O error has occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |