Package org.apache.commons.compress
Class CompressException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.compress.CompressException
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 ArchiveException,CompressorException,MemoryLimitException,Pack200Exception,PasswordRequiredException
Signals that a Pack200 Compress exception of some sort has occurred.
- Since:
 - 1.28.0
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionConstructs anCompressExceptionwithnullas its error detail message.CompressException(String message) Constructs a new exception with the specified detail message.CompressException(String message, Throwable cause) Constructs a new exception with the specified detail message and cause.CompressException(Throwable cause) Constructs aCompressExceptionwith the specified cause and a detail message. - 
Method Summary
Modifier and TypeMethodDescriptionprotected static <T,E extends Throwable> 
TrequireNonNull(Class<? super E> cls, T obj, Supplier<String> messageSupplier) Checks that the specified object reference is notnulland throws a customizedCompressExceptionif it isMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
- 
Constructor Details
- 
CompressException
public CompressException()Constructs anCompressExceptionwithnullas its error detail message. - 
CompressException
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 theThrowable.getMessage()method).
 - 
CompressException
Constructs a new exception with the specified detail message and cause.- Parameters:
 message- The message (which is saved for later retrieval by theThrowable.getMessage()method).cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). A null value indicates that the cause is nonexistent or unknown.
 - 
CompressException
Constructs aCompressExceptionwith the specified cause and a detail message.- Parameters:
 cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
 
 - 
 - 
Method Details
- 
requireNonNull
protected static <T,E extends Throwable> T requireNonNull(Class<? super E> cls, T obj, Supplier<String> messageSupplier) throws E Checks that the specified object reference is notnulland throws a customizedCompressExceptionif 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 aArchiveExceptionis thrown- Returns:
 objif notnull.- Throws:
 E- ifobjisnull.
 
 -