com.bigdata.io
Class ByteCountOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.bigdata.io.ByteCountOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class ByteCountOutputStream
- extends FilterOutputStream
Output stream which reports the #of bytes read from the underlying stream.
Note: All write methods MUST be overridden if you subclass this
filter as it overrides them all for better performance.
- Version:
- $Id: ByteCountOutputStream.java 4582 2011-05-31 19:12:53Z thompsonbry $
TODO test suite.
- Author:
- Bryan Thompson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteCountOutputStream
public ByteCountOutputStream(OutputStream out)
- Parameters:
out -
getNWritten
public int getNWritten()
write
public void write(int b)
throws IOException
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.