org.eclipse.aether.transfer

## Class ChecksumFailureException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.eclipse.aether.RepositoryException
      - - org.eclipse.aether.transfer.ChecksumFailureException

- All Implemented Interfaces:
    Serializable

      public class ChecksumFailureException
      extends RepositoryException

  Thrown in case of a checksum failure during an artifact/metadata download.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChecksumFailureException(boolean retryWorthy, String message, Throwable cause)` Creates a new exception with the specified retry flag, detail message and cause.
    `ChecksumFailureException(String message)` Creates a new exception with the specified detail message.
    `ChecksumFailureException(String expected, String actual)` Creates a new exception with the specified expected and actual checksum.
    `ChecksumFailureException(String message, Throwable cause)` Creates a new exception with the specified detail message and cause.
    `ChecksumFailureException(Throwable cause)` Creates a new exception with the specified cause.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getActual()` Gets the actual checksum for the downloaded artifact/metadata.
    `String` | `getExpected()` Gets the expected checksum for the downloaded artifact/metadata.
    `boolean` | `isRetryWorthy()` Indicates whether the corresponding download is retry-worthy.

    - ### Methods inherited from class org.eclipse.aether.RepositoryException

      `getMessage`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ChecksumFailureException

          public ChecksumFailureException(String expected,
                                  String actual)

      Creates a new exception with the specified expected and actual checksum. The resulting exception is `retry-worthy`.
      Parameters:
        `expected` - The expected checksum as declared by the hosting repository, may be `null`.
        `actual` - The actual checksum as computed from the local bytes, may be `null`.

    - #### ChecksumFailureException

          public ChecksumFailureException(String message)

      Creates a new exception with the specified detail message. The resulting exception is not `retry-worthy`.
      Parameters:
        `message` - The detail message, may be `null`.

    - #### ChecksumFailureException

          public ChecksumFailureException(Throwable cause)

      Creates a new exception with the specified cause. The resulting exception is not `retry-worthy`.
      Parameters:
        `cause` - The exception that caused this one, may be `null`.

    - #### ChecksumFailureException

          public ChecksumFailureException(String message,
                                  Throwable cause)

      Creates a new exception with the specified detail message and cause. The resulting exception is not `retry-worthy`.
      Parameters:
        `message` - The detail message, may be `null`.
        `cause` - The exception that caused this one, may be `null`.

    - #### ChecksumFailureException

          public ChecksumFailureException(boolean retryWorthy,
                                  String message,
                                  Throwable cause)

      Creates a new exception with the specified retry flag, detail message and cause.
      Parameters:
        `retryWorthy` - `true` if the exception is retry-worthy, `false` otherwise.
        `message` - The detail message, may be `null`.
        `cause` - The exception that caused this one, may be `null`.

  - ### Method Detail

    - #### getExpected

          public String getExpected()

      Gets the expected checksum for the downloaded artifact/metadata.
      Returns:
        The expected checksum as declared by the hosting repository or `null` if unknown.

    - #### getActual

          public String getActual()

      Gets the actual checksum for the downloaded artifact/metadata.
      Returns:
        The actual checksum as computed from the local bytes or `null` if unknown.

    - #### isRetryWorthy

          public boolean isRetryWorthy()

      Indicates whether the corresponding download is retry-worthy.
      Returns:
        `true` if retrying the download might solve the checksum failure, `false` if the checksum failure is non-recoverable.

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.