Package com.itextpdf.xmp.impl
Class CountOutputStream
java.lang.Object
java.io.OutputStream
com.itextpdf.xmp.impl.CountOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An
OutputStream that counts the written bytes.- Since:
- 08.11.2006
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intthe byte counterprivate final OutputStreamthe decorated output stream -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with providing the output stream to decorate. -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
Field Details
-
out
the decorated output stream -
bytesWritten
private int bytesWrittenthe byte counter
-
-
Constructor Details
-
CountOutputStream
CountOutputStream(OutputStream out) Constructor with providing the output stream to decorate.- Parameters:
out- anOutputStream
-
-
Method Details
-
write
Counts the written bytes.- Overrides:
writein classOutputStream- Throws:
IOException- See Also:
-
write
Counts the written bytes.- Overrides:
writein classOutputStream- Throws:
IOException- See Also:
-
write
Counts the written bytes.- Specified by:
writein classOutputStream- Throws:
IOException- See Also:
-
getBytesWritten
public int getBytesWritten()- Returns:
- the bytesWritten
-