org.apache.commons.io.output
Class CountingOutputStream
java.lang.Object
   java.io.OutputStream
java.io.OutputStream
       java.io.FilterOutputStream
java.io.FilterOutputStream
           org.apache.commons.io.output.ProxyOutputStream
org.apache.commons.io.output.ProxyOutputStream
               org.apache.commons.io.output.CountingOutputStream
org.apache.commons.io.output.CountingOutputStream
- All Implemented Interfaces: 
- Closeable, Flushable
- public class CountingOutputStream 
- extends ProxyOutputStream
Used in debugging, it counts the number of bytes that pass 
 through it.
- Version:
- $Id: CountingOutputStream.java 140517 2004-02-23 04:40:29Z bayard $
- Author:
- Henri Yandell
 
 
 
| Method Summary | 
|  int | getCount()The number of bytes that have passed through this stream.
 | 
|  void | write(byte[] b)
 | 
|  void | write(byte[] b,
      int off,
      int len)
 | 
|  void | write(int b)
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
CountingOutputStream
public CountingOutputStream(OutputStream out)
- Constructs a CountingOutputStream.
 
- Parameters:
- out- the OutputStream to write to
 
write
public void write(byte[] b)
           throws IOException
- 
- Overrides:
- writein class- ProxyOutputStream
 
- 
- Throws:
- IOException
- See Also:
- OutputStream.write(byte[])
 
write
public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
- 
- Overrides:
- writein class- ProxyOutputStream
 
- 
- Throws:
- IOException
- See Also:
- OutputStream.write(byte[], int, int)
 
write
public void write(int b)
           throws IOException
- 
- Overrides:
- writein class- ProxyOutputStream
 
- 
- Throws:
- IOException
- See Also:
- OutputStream.write(int)
 
getCount
public int getCount()
- The number of bytes that have passed through this stream.
 
- 
- Returns:
- the number of bytes accumulated
 
Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.