|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.gc.iotools.stream.os.SizeRecorderOutputStream
public class SizeRecorderOutputStream
This class counts the number of bytes written to the
OutputStream passed in the constructor.
| Constructor Summary | |
|---|---|
SizeRecorderOutputStream(OutputStream destination)
Creates a new SizeRecorderOutputStream with the given
destination stream. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
long |
getSize()
Returns the number of bytes written until now. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizeRecorderOutputStream(OutputStream destination)
SizeRecorderOutputStream with the given
destination stream.
destination - Destination stream where data are written.| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic long getSize()
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void write(int b)
throws IOException
write in class OutputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||