|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.w3c.util.CountOutputStream
public class CountOutputStream
This class can be used to count number of bytes emitted to a stream. The stream will actually throw the data away. It's main function is to count the number of bytes emitted to a stream before actually emitting the bytes (that's not really efficient, but works enough).
Field Summary | |
---|---|
protected int |
count
|
Constructor Summary | |
---|---|
CountOutputStream()
Create a new instance of that class. |
Method Summary | |
---|---|
void |
close()
Close that count stream. |
void |
flush()
Flush that count stream. |
int |
getCount()
Get the current number of bytes emitted to that stream. |
void |
write(byte[] b)
Write an array of bytes to that stream. |
void |
write(byte[] b,
int off,
int len)
Write part of an array of bytes to that stream. |
void |
write(int b)
Write a single byte to that stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int count
Constructor Detail |
---|
public CountOutputStream()
Method Detail |
---|
public int getCount()
public void close()
close
in interface java.io.Closeable
close
in class java.io.OutputStream
public void flush()
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
public void write(byte[] b)
write
in class java.io.OutputStream
public void write(byte[] b, int off, int len)
write
in class java.io.OutputStream
public void write(int b)
write
in class java.io.OutputStream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |