public interface SdkChecksum extends Checksum
Checksum to support checksums and checksum validations used by the SDK that
are not provided by the JDK.| Modifier and Type | Method and Description |
|---|---|
static SdkChecksum |
forAlgorithm(Algorithm algorithm)
Gets the Checksum based on the required Algorithm.
|
byte[] |
getChecksumBytes()
Returns the computed checksum in a byte array rather than the long provided by
Checksum.getValue(). |
void |
mark(int readLimit)
Allows marking a checksum for checksums that support the ability to mark and reset.
|
default void |
update(byte[] b)
Updates the current checksum with the specified array of bytes.
|
default void |
update(ByteBuffer buffer)
Updates the current checksum with the bytes from the specified buffer.
|
byte[] getChecksumBytes()
Checksum.getValue().void mark(int readLimit)
readLimit - the maximum limit of bytes that can be read before the mark position becomes invalid.static SdkChecksum forAlgorithm(Algorithm algorithm)
algorithm - Algorithm for calculating the checksumdefault void update(byte[] b)
b - the array of bytes to update the checksum withNullPointerException - if b is nulldefault void update(ByteBuffer buffer)
buffer - the ByteBuffer to update the checksum withNullPointerException - if buffer is nullCopyright © 2023. All rights reserved.