com.itextpdf.xmp.impl
Class CountOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.itextpdf.xmp.impl.CountOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class CountOutputStream
extends OutputStream

An OutputStream that counts the written bytes.

Since:
08.11.2006

Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException
Counts the written bytes.

Overrides:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(byte[], int, int)

write

public void write(byte[] buf)
           throws IOException
Counts the written bytes.

Overrides:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(byte[])

write

public void write(int b)
           throws IOException
Counts the written bytes.

Specified by:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(int)

getBytesWritten

public int getBytesWritten()
Returns:
the bytesWritten


Copyright © 2013. All Rights Reserved.