Class MismatchingChecksumException

  • All Implemented Interfaces:
    Serializable

    public class MismatchingChecksumException
    extends IOException
    A special IOException thrown when the actual checksum (e.g. MD5, SHA256 etc.) of a piece of data did not match the expected checksum.
    Since:
    8.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • MismatchingChecksumException

        public MismatchingChecksumException​(String checksumType,
                                            String actualChecksum,
                                            String expectedChecksum)
        Creates a new exception for when an actual checksum did not match the expected checksum.
        Parameters:
        checksumType - Type of the checksum, e.g. MD5 or SHA256.
        actualChecksum - Actual checksum of the piece of data.
        expectedChecksum - Expected checksum.
      • MismatchingChecksumException

        public MismatchingChecksumException​(String checksumType,
                                            String actualChecksum,
                                            String expectedChecksum,
                                            String message)
        Creates a new exception for when an actual checksum did not match the expected checksum.
        Parameters:
        checksumType - Type of the checksum, e.g. MD5 or SHA256.
        actualChecksum - Actual checksum of the piece of data.
        expectedChecksum - Expected checksum.
        message - Message with details about the checksum mismatch.
      • MismatchingChecksumException

        public MismatchingChecksumException​(String checksumType,
                                            String actualChecksum,
                                            String expectedChecksum,
                                            String message,
                                            Throwable cause)
        Creates a new exception for when an actual checksum did not match the expected checksum.
        Parameters:
        checksumType - Type of the checksum, e.g. MD5 or SHA256.
        actualChecksum - Actual checksum of the piece of data.
        expectedChecksum - Expected checksum.
        message - Message with details about the checksum mismatch.
        cause - Underlying cause of the error.
      • MismatchingChecksumException

        public MismatchingChecksumException​(String checksumType,
                                            String actualChecksum,
                                            String expectedChecksum,
                                            Throwable cause)
        Creates a new exception for when an actual checksum did not match the expected checksum.
        Parameters:
        checksumType - Type of the checksum, e.g. MD5 or SHA256.
        actualChecksum - Actual checksum of the piece of data.
        expectedChecksum - Expected checksum.
        cause - Underlying cause of the error.
    • Method Detail

      • getActualChecksum

        public String getActualChecksum()
        Returns:
        Actual checksum of the piece of data.
      • getChecksumType

        public String getChecksumType()
        Returns:
        Type of the checksum, e.g. MD5 or SHA256.
      • getExpectedChecksum

        public String getExpectedChecksum()
        Returns:
        Expected checksum for the piece of data.