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:
java.io.Serializable
- Direct Known Subclasses:
DumpArchiveException,StreamingNotSupportedException
public class ArchiveException extends CompressException
Signals that an Archive exception of some sort has occurred.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArchiveException()Constructs anArchiveExceptionwithnullas its error detail message.ArchiveException(java.lang.String message)Constructs a new exception with the specified detail message.ArchiveException(java.lang.String message, java.lang.Exception cause)Deprecated.ArchiveException(java.lang.String message, java.lang.Throwable cause)Constructs a new exception with the specified detail message and cause.ArchiveException(java.lang.Throwable cause)Constructs aArchiveExceptionwith the specified cause and a detail message.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TrequireNonNull(T obj, java.util.function.Supplier<java.lang.String> messageSupplier)Checks that the specified object reference is notnulland throws a customizedArchiveExceptionif it is.-
Methods inherited from class org.apache.commons.compress.CompressException
requireNonNull
-
-
-
-
Constructor Detail
-
ArchiveException
public ArchiveException()
Constructs anArchiveExceptionwithnullas its error detail message.- Since:
- 1.28.0
-
ArchiveException
public ArchiveException(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 theThrowable.getMessage()method).
-
ArchiveException
@Deprecated public ArchiveException(java.lang.String message, java.lang.Exception cause)
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
public ArchiveException(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 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
public ArchiveException(java.lang.Throwable cause)
Constructs aArchiveExceptionwith 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 Detail
-
requireNonNull
public static <T> T requireNonNull(T obj, java.util.function.Supplier<java.lang.String> messageSupplier) throws ArchiveException
Checks that the specified object reference is notnulland throws a customizedArchiveExceptionif 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 aArchiveExceptionis thrown- Returns:
objif notnull- Throws:
ArchiveException- ifobjisnull- Since:
- 1.28.0
-
-