org.apache.geronimo.javamail.util
Class CountingOutputStream
java.lang.Object
java.io.OutputStream
org.apache.geronimo.javamail.util.CountingOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class CountingOutputStream
- extends OutputStream
An implementation of an OutputStream just counts
the number of bytes written to the stream.
- Version:
- $Rev: 671217 $ $Date: 2008-06-24 11:39:52 -0400 (Tue, 24 Jun 2008) $
Method Summary |
int |
getCount()
Get the current accumulator total for this stream. |
void |
reset()
Reset the counter to zero. |
void |
write(int ch)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountingOutputStream
public CountingOutputStream()
write
public void write(int ch)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
getCount
public int getCount()
- Get the current accumulator total for this stream.
- Returns:
- The current count.
reset
public void reset()
- Reset the counter to zero.
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.