Class ArchiveException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.compress.CompressException
org.apache.commons.compress.archivers.ArchiveException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DumpArchiveException
,StreamingNotSupportedException
Signals that an Archive exception of some sort has occurred.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs anArchiveException
withnull
as its error detail message.ArchiveException
(String message) Constructs a new exception with the specified detail message.ArchiveException
(String message, Exception cause) Deprecated.ArchiveException
(String message, Throwable cause) Constructs a new exception with the specified detail message and cause.ArchiveException
(Throwable cause) Constructs aArchiveException
with the specified cause and a detail message. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
requireNonNull
(T obj, Supplier<String> messageSupplier) Checks that the specified object reference is notnull
and throws a customizedArchiveException
if it isMethods inherited from class org.apache.commons.compress.CompressException
requireNonNull
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ArchiveException
public ArchiveException()Constructs anArchiveException
withnull
as its error detail message.- Since:
- 1.28.0
-
ArchiveException
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).
-
ArchiveException
Deprecated.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.
-
ArchiveException
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.- Since:
- 1.28.0
-
ArchiveException
Constructs aArchiveException
with 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.)- Since:
- 1.28.0
-
-
Method Details
-
requireNonNull
Checks that the specified object reference is notnull
and throws a customizedArchiveException
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 aArchiveException
is thrown- Returns:
obj
if notnull
- Throws:
ArchiveException
- ifobj
isnull
- Since:
- 1.28.0
-
ArchiveException(String, Throwable)
.