com.izforge.izpack.compiler
Class ByteCountingOutputStream
java.lang.Object
java.io.OutputStream
com.izforge.izpack.compiler.ByteCountingOutputStream
- public class ByteCountingOutputStream
- extends java.io.OutputStream
Stream which countes the bytes written through it. Be sure to flush before checking size.
Field Summary |
private long |
count
|
private java.io.OutputStream |
os
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
count
private long count
os
private java.io.OutputStream os
ByteCountingOutputStream
public ByteCountingOutputStream(java.io.OutputStream os)
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
getByteCount
public long getByteCount()