public class Crc32ChecksumValidatingInputStream extends SdkFilterInputStream
Crc32ChecksumCalculatingInputStream and after the stream is closed
will validate the calculated checksum against the actual checksum.in| Constructor and Description |
|---|
Crc32ChecksumValidatingInputStream(InputStream in,
long expectedChecksum) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying stream and validates the calculated checksum against the expected.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
abort, abortIfNeeded, available, mark, markSupported, release, reset, skipreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleasepublic 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 Closeableclose in interface AutoCloseableclose in class SdkFilterInputStreamCrc32MismatchException - If the calculated CRC32 checksum does not match the expected.IOExceptionpublic int read()
throws IOException
read in class SdkFilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class SdkFilterInputStreamIOExceptionCopyright © 2026. All rights reserved.