com.amazonaws.util
Class CRC32ChecksumCalculatingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.amazonaws.internal.SdkFilterInputStream
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.
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CRC32ChecksumCalculatingInputStream
public CRC32ChecksumCalculatingInputStream(InputStream in)
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.