Class CompressException

    • Constructor Summary

      Constructors 
      Constructor Description
      CompressException()
      Constructs an CompressException with null as its error detail message.
      CompressException​(java.lang.String message)
      Constructs a new exception with the specified detail message.
      CompressException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new exception with the specified detail message and cause.
      CompressException​(java.lang.Throwable cause)
      Constructs a CompressException with the specified cause and a detail message.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static <T,​E extends java.lang.Throwable>
      T
      requireNonNull​(java.lang.Class<? super E> cls, T obj, java.util.function.Supplier<java.lang.String> messageSupplier)
      Checks that the specified object reference is not null and throws a customized CompressException if it is.
      • 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

      • CompressException

        public CompressException()
        Constructs an CompressException with null as its error detail message.
      • CompressException

        public CompressException​(java.lang.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).
      • CompressException

        public CompressException​(java.lang.String message,
                                 java.lang.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.
      • CompressException

        public CompressException​(java.lang.Throwable cause)
        Constructs a CompressException 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.)
    • Method Detail

      • requireNonNull

        protected static <T,​E extends java.lang.Throwable> T requireNonNull​(java.lang.Class<? super E> cls,
                                                                                  T obj,
                                                                                  java.util.function.Supplier<java.lang.String> messageSupplier)
                                                                           throws E extends java.lang.Throwable
        Checks that the specified object reference is not null and throws a customized CompressException if it is. *
        Type Parameters:
        T - The type of the reference.
        E - The type of the exception.
        Parameters:
        cls - The exception class.
        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:
        E - if obj is null.
        E extends java.lang.Throwable