org.freehep.util.io
Class CountedByteOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.freehep.util.io.CountedByteOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class CountedByteOutputStream
- extends FilterOutputStream
The CountedByteOutputStream counts the number of bytes written.
- Version:
- $Id: CountedByteOutputStream.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountedByteOutputStream
public CountedByteOutputStream(OutputStream out)
- Creates a Counted Bytes output stream from the given stream.
- Parameters:
out
- stream to write to
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 offset,
int len)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
getCount
public int getCount()
- Returns:
- number of bytes written.
Copyright © 2000-2007 FreeHEP. All Rights Reserved.