Class CRC32
- java.lang.Object
-
- software.amazon.awssdk.crt.checksums.CRC32
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.util.zip.Checksum
public class CRC32 extends java.lang.Object implements java.util.zip.Checksum, java.lang.Cloneable
CRT implementation of the Java Checksum interface for making CRC32 checksum calculations
-
-
Constructor Summary
Constructors Constructor Description CRC32()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
long
getValue()
Returns the current checksum value.void
reset()
Resets the checksum to its initial value.void
update(byte[] b)
Updates the current checksum with the specified array of bytes.void
update(byte[] b, int off, int len)
Updates the current checksum with the specified array of bytes.void
update(int b)
Updates the current checksum with the specified byte.
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
getValue
public long getValue()
Returns the current checksum value.- Specified by:
getValue
in interfacejava.util.zip.Checksum
- Returns:
- the current checksum value.
-
reset
public void reset()
Resets the checksum to its initial value.- Specified by:
reset
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b, int off, int len)
Updates the current checksum with the specified array of bytes.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- the byte array to update the checksum withoff
- the starting offset within b of the data to uselen
- the number of bytes to use in the update
-
update
public void update(byte[] b)
Updates the current checksum with the specified array of bytes.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- the byte array to update the checksum with
-
update
public void update(int b)
Updates the current checksum with the specified byte.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- the byte to update the checksum with
-
-