Closeable, AutoCloseable, Releasable, MetricAwarepublic class Crc32ChecksumValidatingInputStream extends SdkFilterInputStream
Crc32ChecksumCalculatingInputStream and after the stream is closed
will validate the calculated checksum against the actual checksum.| Constructor | Description |
|---|---|
Crc32ChecksumValidatingInputStream(InputStream in,
long expectedChecksum) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the underlying stream and validates the calculated checksum against the expected.
|
readreadAllBytes, readNBytes, transferToequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseavailable, isMetricActivated, mark, markSupported, read, read, release, reset, skippublic Crc32ChecksumValidatingInputStream(InputStream in, long expectedChecksum)
in - Input stream to content.expectedChecksum - Expected CRC32 checksum returned by the service.public void close()
throws IOException
close in interface AutoCloseableclose in interface Closeableclose in class SdkFilterInputStreamCrc32MismatchException - If the calculated CRC32 checksum does not match the expected.IOExceptionCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.