Package i2p.susi.util
Class CountingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
i2p.susi.util.CountingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class CountingOutputStream extends FilterOutputStream
An OutputStream that counts how many bytes are written
and returns the count via getWritten().
- Since:
- 0.9.34
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CountingOutputStream(OutputStream out)
-
Method Summary
Modifier and Type Method Description long
getWritten()
void
write(byte[] src, int off, int len)
void
write(int val)
-
Constructor Details
-
Method Details
-
getWritten
public long getWritten() -
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-