com.amazonaws.util
Class CRC32ChecksumCalculatingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.amazonaws.internal.SdkFilterInputStream
              extended by com.amazonaws.util.CRC32ChecksumCalculatingInputStream
All Implemented Interfaces:
com.amazonaws.internal.MetricAware, Closeable

public class CRC32ChecksumCalculatingInputStream
extends com.amazonaws.internal.SdkFilterInputStream

Simple InputStream wrapper that examines the wrapped stream's contents as they are read and calculates and CRC32 checksum.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CRC32ChecksumCalculatingInputStream(InputStream in)
           
 
Method Summary
 long getCRC32Checksum()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void reset()
          Resets the wrapped input stream and the CRC32 computation.
 
Methods inherited from class com.amazonaws.internal.SdkFilterInputStream
abort, abortIfNeeded, available, close, isMetricActivated, mark, markSupported, skip
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRC32ChecksumCalculatingInputStream

public CRC32ChecksumCalculatingInputStream(InputStream in)
Method Detail

getCRC32Checksum

public long getCRC32Checksum()

reset

public void reset()
           throws IOException
Resets the wrapped input stream and the CRC32 computation.

Overrides:
reset in class com.amazonaws.internal.SdkFilterInputStream
Throws:
IOException
See Also:
InputStream.reset()

read

public int read()
         throws IOException
Overrides:
read in class com.amazonaws.internal.SdkFilterInputStream
Throws:
IOException
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class com.amazonaws.internal.SdkFilterInputStream
Throws:
IOException
See Also:
InputStream.read(byte[], int, int)


Copyright © 2016. All rights reserved.