Object ChecksumUtil

  • All Implemented Interfaces:

    
    public class ChecksumUtil
    
                        

    Utility class for AWS SDK checksum operations. Handles checksum verification and calculation using AWS SDK algorithms. For MD5/ETag digest operations, see DigestUtil.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit verifyChecksum(String expected, String actual, ChecksumAlgorithm checksumAlgorithm)
      final String checksumFor(Path path, ChecksumAlgorithm algorithm) Calculate a checksum for the given path and algorithm.
      final String checksumMultipart(List<Path> paths, ChecksumAlgorithm algorithm) Calculates the checksum for a list of paths.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • checksumFor

         final String checksumFor(Path path, ChecksumAlgorithm algorithm)

        Calculate a checksum for the given path and algorithm.

        Parameters:
        path - Path containing the bytes to generate the checksum for
        algorithm - algorithm to use
        Returns:

        the checksum

      • checksumMultipart

         final String checksumMultipart(List<Path> paths, ChecksumAlgorithm algorithm)

        Calculates the checksum for a list of paths. For multipart uploads, AWS takes the checksum of all parts, concatenates them, and then takes the checksum again. Then, they add a hyphen and the number of parts used to calculate the checksum. API