Package org.apache.commons.vfs2.util
Class FileObjectUtils
java.lang.Object
org.apache.commons.vfs2.util.FileObjectUtils
Stuff to get some strange things from an FileObject.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractFileObject
getAbstractFileObject
(FileObject fileObject) Get access to the base object even if decorated.static boolean
isInstanceOf
(FileObject fileObject, Class<?> wantedClass) Check if the given FileObject is instance of given class argument.
-
Method Details
-
getAbstractFileObject
public static AbstractFileObject getAbstractFileObject(FileObject fileObject) throws FileSystemException Get access to the base object even if decorated.- Parameters:
fileObject
- The FileObject.- Returns:
- The decorated FileObject or null.
- Throws:
FileSystemException
- if an error occurs.
-
isInstanceOf
public static boolean isInstanceOf(FileObject fileObject, Class<?> wantedClass) throws FileSystemException Check if the given FileObject is instance of given class argument.- Parameters:
fileObject
- The FileObject.wantedClass
- The Class to check.- Returns:
- true if fileObject is an instance of the specified Class.
- Throws:
FileSystemException
- if an error occurs.
-