Package org.apache.commons.vfs2.util
Class FileObjectUtils
- java.lang.Object
-
- org.apache.commons.vfs2.util.FileObjectUtils
-
public final class FileObjectUtils extends java.lang.Object
Stuff to get some strange things from an FileObject.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractFileObject
getAbstractFileObject(FileObject fileObject)
Get access to the base object even if decorated.static boolean
isInstanceOf(FileObject fileObject, java.lang.Class<?> wantedClass)
Check if the given FileObject is instance of given class argument.
-
-
-
Method Detail
-
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, java.lang.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.
-
-