Package io.ocfl.api.exception
Class OcflIOException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.ocfl.api.exception.OcflJavaException
-
- io.ocfl.api.exception.OcflIOException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OcflFileAlreadyExistsException
,OcflNoSuchFileException
public class OcflIOException extends OcflJavaException
This exception is a wrapper around an IOException- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OcflIOException(Exception cause)
OcflIOException(String message)
OcflIOException(String message, Exception cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OcflIOException
from(IOException e)
Wraps an IO exception in the appropriate wrapper class.String
getMessage()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
from
public static OcflIOException from(IOException e)
Wraps an IO exception in the appropriate wrapper class. For example, NoSuchFileException to OcflNoSuchFileException.- Parameters:
e
- the base exception- Returns:
- wrapped exception
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-