Class Crc32Checksum
- java.lang.Object
-
- software.amazon.awssdk.core.checksums.Crc32Checksum
-
- All Implemented Interfaces:
Checksum
,SdkChecksum
public class Crc32Checksum extends Object implements SdkChecksum
Implementation ofSdkChecksum
to calculate an CRC32 checksum.
-
-
Constructor Summary
Constructors Constructor Description Crc32Checksum()
Creates CRT Based Crc32 checksum if Crt classpath for Crc32 is loaded, else create Sdk Implemented Crc32.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getChecksumBytes()
Returns the computed checksum in a byte array rather than the long provided byChecksum.getValue()
.long
getValue()
void
mark(int readLimit)
Allows marking a checksum for checksums that support the ability to mark and reset.void
reset()
void
update(byte[] b, int off, int len)
void
update(int b)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.checksums.SdkChecksum
update, update
-
-
-
-
Method Detail
-
getChecksumBytes
public byte[] getChecksumBytes()
Description copied from interface:SdkChecksum
Returns the computed checksum in a byte array rather than the long provided byChecksum.getValue()
.- Specified by:
getChecksumBytes
in interfaceSdkChecksum
- Returns:
- byte[] containing the checksum
-
mark
public void mark(int readLimit)
Description copied from interface:SdkChecksum
Allows marking a checksum for checksums that support the ability to mark and reset.- Specified by:
mark
in interfaceSdkChecksum
- Parameters:
readLimit
- the maximum limit of bytes that can be read before the mark position becomes invalid.
-
-