Class ChecksumUtil
java.lang.Object
software.amazon.awssdk.http.auth.aws.internal.signer.util.ChecksumUtil
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An implementation of aChecksumAlgorithm
that will map toConstantChecksum
, which provides a constant checksum. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checksumHeaderName
(ChecksumAlgorithm checksumAlgorithm) Get the correct checksum header name based on the checksum-algorithm.static SdkChecksum
fromChecksumAlgorithm
(ChecksumAlgorithm checksumAlgorithm) Gets the SdkChecksum object based on the given ChecksumAlgorithm.static void
readAll
(InputStream inputStream) Read the entirety of an input-stream - this is useful when the stream has side-effects (such as calculating a checksum) when it gets read.
-
Method Details
-
checksumHeaderName
Get the correct checksum header name based on the checksum-algorithm. This is required to be of the formx-amz-checksum-*
, where '*' is alphanumeric checksum-algorithm-id in lower-case form. Examples include:x-amz-checksum-sha256, x-amz-checksum-sha1, x-amz-checksum-crc32, x-amz-checksum-crc32c, x-amz-checksum-md5
-
fromChecksumAlgorithm
Gets the SdkChecksum object based on the given ChecksumAlgorithm. -
readAll
Read the entirety of an input-stream - this is useful when the stream has side-effects (such as calculating a checksum) when it gets read.
-