public class ChecksumCalculatingInputStream extends InputStream
| Constructor and Description |
|---|
ChecksumCalculatingInputStream(InputStream in,
SdkChecksum cksum)
Creates an input stream using the specified Checksum.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getChecksumBytes() |
int |
read()
Reads from the underlying stream.
|
int |
read(byte[] buf,
int off,
int len)
Reads up to len bytes at a time from the input stream, updates the checksum.
|
void |
reset()
Resets stream state, including the running checksum.
|
available, close, mark, markSupported, read, skippublic ChecksumCalculatingInputStream(InputStream in, SdkChecksum cksum)
in - the input stream to readcksum - the Checksum implementation to use for computing the checksumpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreambuf - buffer to write intooff - offset in the buffer to write tolen - maximum number of bytes to attempt to read.IOExceptionpublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic byte[] getChecksumBytes()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.