Package org.verapdf.xmp.impl
Class CountOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.verapdf.xmp.impl.CountOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public final class CountOutputStream extends OutputStream
AnOutputStreamthat counts the written bytes.- Since:
- 08.11.2006
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBytesWritten()voidwrite(byte[] buf)Counts the written bytes.voidwrite(byte[] buf, int off, int len)Counts the written bytes.voidwrite(int b)Counts the written bytes.-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
-
-
-
Method Detail
-
write
public void write(byte[] buf, int off, int len) throws IOExceptionCounts the written bytes.- Overrides:
writein classOutputStream- Throws:
IOException- See Also:
OutputStream.write(byte[], int, int)
-
write
public void write(byte[] buf) throws IOExceptionCounts the written bytes.- Overrides:
writein classOutputStream- Throws:
IOException- See Also:
OutputStream.write(byte[])
-
write
public void write(int b) throws IOExceptionCounts the written bytes.- Specified by:
writein classOutputStream- Throws:
IOException- See Also:
OutputStream.write(int)
-
getBytesWritten
public int getBytesWritten()
- Returns:
- the bytesWritten
-
-