Package org.apache.commons.vfs2
Class FileSystemException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.vfs2.FileSystemException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- FileNotFolderException,- FileNotFoundException,- FileTypeHasNoContentException
Thrown for file system errors.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionFileSystemException(String code) Constructs exception with the specified detail message.FileSystemException(String code, Object info) Constructs exception with the specified detail message.FileSystemException(String code, Object... info) Constructs exception with the specified detail message.FileSystemException(String code, Object[] info, Throwable cause) Deprecated.FileSystemException(String code, Object info, Throwable cause) Constructs exception with the specified detail message and cause.FileSystemException(String code, Throwable cause) Constructs exception with the specified detail message.FileSystemException(String code, Throwable cause, Object... info) Constructs exception with the specified detail message.FileSystemException(Throwable cause) Constructs wrapper exception.
- 
Method SummaryModifier and TypeMethodDescriptiongetCode()Retrieves error code of the exception.String[]getInfo()Retrieves array of complementary info (context).Retrieves message from bundle.static <T> TrequireNonNull(T obj, String code) Throws a FileSystemException when the given object is null.static <T> TrequireNonNull(T obj, String code, Object... info) Throws a FileSystemException when the given object is null.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
FileSystemExceptionConstructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
 
- 
FileSystemExceptionConstructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
- info- one context information.
 
- 
FileSystemExceptionConstructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
- info- array of complementary info (context).
 
- 
FileSystemExceptionConstructs exception with the specified detail message and cause.- Parameters:
- code- the error code of the message.
- info- one context information.
- cause- the cause.
 
- 
FileSystemExceptionDeprecated.Use insteadFileSystemException(String, Throwable, Object[]). Will be removed in 3.0.Constructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
- info- array of complementary info (context).
- cause- the cause.
 
- 
FileSystemExceptionConstructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
- cause- the original cause
 
- 
FileSystemExceptionConstructs exception with the specified detail message.- Parameters:
- code- the error code of the message.
- cause- the cause.
- info- array of complementary info (context).
 
- 
FileSystemExceptionConstructs wrapper exception.- Parameters:
- cause- the root cause to wrap.
 
 
- 
- 
Method Details- 
requireNonNullThrows a FileSystemException when the given object is null.- Type Parameters:
- T- the type of the reference
- Parameters:
- obj- the object reference to check for null.
- code- message used when- FileSystemExceptionis thrown
- Returns:
- objif not- null
- Throws:
- FileSystemException- if- objis- null
- Since:
- 2.3
 
- 
requireNonNullThrows a FileSystemException when the given object is null.- Type Parameters:
- T- the type of the reference
- Parameters:
- obj- the object reference to check for null.
- code- message used when- FileSystemExceptionis thrown
- info- one context information.
- Returns:
- objif not- null
- Throws:
- FileSystemException- if- objis- null
- Since:
- 2.3
 
- 
getCodeRetrieves error code of the exception. Could be used as key for internationalization.- Returns:
- the code.
 
- 
getInfoRetrieves array of complementary info (context). Could be used as parameter for internationalization.- Returns:
- the context info.
 
- 
getMessageRetrieves message from bundle.- Overrides:
- getMessagein class- Throwable
- Returns:
- The exception message.
 
 
- 
FileSystemException(String, Throwable, Object[]).