com.partnersoft.io
Class CountingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.partnersoft.io.CountingOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
- Direct Known Subclasses:
- UploadReportingOutputStream
public class CountingOutputStream
- extends java.io.FilterOutputStream
An output stream that counts off bytecount of all reads.
- Author:
- Paul Reavis
Copyright 2000 Partner Software, Inc.
| Fields inherited from class java.io.FilterOutputStream |
out |
| Methods inherited from class java.io.FilterOutputStream |
close, flush |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountingOutputStream
public CountingOutputStream(java.io.OutputStream out)
write
public void write(int byteMe)
throws java.io.IOException
- Overrides:
write in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.FilterOutputStream
- Throws:
java.io.IOException
bytesWereWritten
public void bytesWereWritten(int byteCount)
- Override this to be notified of each batch of data.
getByteCount
public long getByteCount()