Class ArchiveException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DumpArchiveException, StreamingNotSupportedException

public class ArchiveException extends CompressException
Signals that an Archive exception of some sort has occurred.
See Also:
  • Constructor Details

    • ArchiveException

      Constructs an ArchiveException with null as its error detail message.
      Since:
      1.28.0
    • ArchiveException

      public ArchiveException(String message)
      Constructs a new exception with the specified detail message. The cause is not initialized.
      Parameters:
      message - The message (which is saved for later retrieval by the Throwable.getMessage() method).
    • ArchiveException

      @Deprecated public ArchiveException(String message, Exception cause)
      Constructs a new exception with the specified detail message and cause.
      Parameters:
      message - The message (which is saved for later retrieval by the Throwable.getMessage() method).
      cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). A null value indicates that the cause is nonexistent or unknown.
    • ArchiveException

      public ArchiveException(String message, Throwable cause)
      Constructs a new exception with the specified detail message and cause.
      Parameters:
      message - The message (which is saved for later retrieval by the Throwable.getMessage() method).
      cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). A null value indicates that the cause is nonexistent or unknown.
      Since:
      1.28.0
    • ArchiveException

      public ArchiveException(Throwable cause)
      Constructs a ArchiveException with the specified cause and a detail message.
      Parameters:
      cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      Since:
      1.28.0
  • Method Details

    • requireNonNull

      public static <T> T requireNonNull(T obj, Supplier<String> messageSupplier) throws ArchiveException
      Checks that the specified object reference is not null and throws a customized ArchiveException if it is. *
      Type Parameters:
      T - the type of the reference.
      Parameters:
      obj - the object reference to check for nullity.
      messageSupplier - supplier of the detail message to be used in the event that a ArchiveException is thrown
      Returns:
      obj if not null
      Throws:
      ArchiveException - if obj is null
      Since:
      1.28.0