Package com.itextpdf.xmp.impl
Class CountOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.itextpdf.xmp.impl.CountOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public final class CountOutputStream extends OutputStream
AnOutputStream
that counts the written bytes.- Since:
- 08.11.2006
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBytesWritten()
void
write(byte[] buf)
Counts the written bytes.void
write(byte[] buf, int off, int len)
Counts the written bytes.void
write(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 IOException
Counts the written bytes.- Overrides:
write
in classOutputStream
- Throws:
IOException
- See Also:
OutputStream.write(byte[], int, int)
-
write
public void write(byte[] buf) throws IOException
Counts the written bytes.- Overrides:
write
in classOutputStream
- Throws:
IOException
- See Also:
OutputStream.write(byte[])
-
write
public void write(int b) throws IOException
Counts the written bytes.- Specified by:
write
in classOutputStream
- Throws:
IOException
- See Also:
OutputStream.write(int)
-
getBytesWritten
public int getBytesWritten()
- Returns:
- the bytesWritten
-
-