com.amazonaws.util
Class CountingInputStream

java.lang.Object
  extended by SdkFilterInputStream
      extended by com.amazonaws.util.CountingInputStream

public class CountingInputStream
extends SdkFilterInputStream

Simple input stream wrapper utility to count the bytes read from a stream.


Constructor Summary
CountingInputStream(java.io.InputStream in)
           
 
Method Summary
 long getByteCount()
          Returns the number of bytes read from this stream so far.
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingInputStream

public CountingInputStream(java.io.InputStream in)
Method Detail

getByteCount

public long getByteCount()
Returns the number of bytes read from this stream so far.

Returns:
the number of bytes read from this stream so far.

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.