Class DefaultPayloadChecksumStore
- java.lang.Object
-
- software.amazon.awssdk.http.auth.spi.internal.signer.DefaultPayloadChecksumStore
-
- All Implemented Interfaces:
PayloadChecksumStore
@ThreadSafe public class DefaultPayloadChecksumStore extends Object implements PayloadChecksumStore
Default implementation ofPayloadChecksumStore.
-
-
Constructor Summary
Constructors Constructor Description DefaultPayloadChecksumStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsChecksumValue(ChecksumAlgorithm algorithm)Returnstrueif the store contains a checksum value for the given algorithm,falseotherwise.byte[]getChecksumValue(ChecksumAlgorithm algorithm)Retrieve the stored checksum value for the given algorithm.byte[]putChecksumValue(ChecksumAlgorithm algorithm, byte[] value)Store the checksum value computed using the given algorithm.
-
-
-
Method Detail
-
putChecksumValue
public byte[] putChecksumValue(ChecksumAlgorithm algorithm, byte[] value)
Description copied from interface:PayloadChecksumStoreStore the checksum value computed using the given algorithm.- Specified by:
putChecksumValuein interfacePayloadChecksumStore- Returns:
- The previous value stored for this algorithm or
nullif not present.
-
getChecksumValue
public byte[] getChecksumValue(ChecksumAlgorithm algorithm)
Description copied from interface:PayloadChecksumStoreRetrieve the stored checksum value for the given algorithm.- Specified by:
getChecksumValuein interfacePayloadChecksumStore- Returns:
- The checksum value for the given algorithm or
nullif not present.
-
containsChecksumValue
public boolean containsChecksumValue(ChecksumAlgorithm algorithm)
Description copied from interface:PayloadChecksumStoreReturnstrueif the store contains a checksum value for the given algorithm,falseotherwise.- Specified by:
containsChecksumValuein interfacePayloadChecksumStore
-
-