java.lang.Object
software.amazon.awssdk.http.auth.aws.internal.signer.checksums.Crc32Checksum
All Implemented Interfaces:
Checksum, SdkChecksum

public class Crc32Checksum extends Object implements SdkChecksum
Implementation of SdkChecksum to calculate an CRC32 checksum.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates CRT Based Crc32 checksum if Crt classpath for Crc32 is loaded, else create Sdk Implemented Crc32.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the computed checksum in a byte array rather than the long provided by Checksum.getValue().
    long
     
    void
    mark(int readLimit)
    Allows marking a checksum for checksums that support the ability to mark and reset.
    void
     
    void
    update(byte[] b, int off, int len)
     
    void
    update(int b)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.awssdk.http.auth.aws.internal.signer.checksums.SdkChecksum

    update, update
  • Constructor Details

    • Crc32Checksum

      public Crc32Checksum()
      Creates CRT Based Crc32 checksum if Crt classpath for Crc32 is loaded, else create Sdk Implemented Crc32.
  • Method Details

    • getChecksumBytes

      public byte[] getChecksumBytes()
      Description copied from interface: SdkChecksum
      Returns the computed checksum in a byte array rather than the long provided by Checksum.getValue().
      Specified by:
      getChecksumBytes in interface SdkChecksum
      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 interface SdkChecksum
      Parameters:
      readLimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
    • update

      public void update(int b)
      Specified by:
      update in interface Checksum
    • update

      public void update(byte[] b, int off, int len)
      Specified by:
      update in interface Checksum
    • getValue

      public long getValue()
      Specified by:
      getValue in interface Checksum
    • reset

      public void reset()
      Specified by:
      reset in interface Checksum