Package org.apache.commons.vfs2.impl
Class Resource
java.lang.Object
org.apache.commons.vfs2.impl.Resource
Helper class for VFSClassLoader. This represents a resource loaded with the classloader.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FileObjectprivate final Stringprivate final FileObjectprivate final FileObject -
Constructor Summary
ConstructorsConstructorDescriptionResource(String name, FileObject root, FileObject resource) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Returns the data for this resource as a byte array.Returns the code source as an URL.Returns the FileObject of the resource.getPackageAttribute(Attributes.Name attrName) Returns an attribute of the package containing the resource.Returns the folder for the package containing the resource.Returns the name of the package containing the resource.getURL()Returns the URL of the resource.
-
Field Details
-
root
-
resource
-
packageFolder
-
packageName
-
-
Constructor Details
-
Resource
Resource(String name, FileObject root, FileObject resource) throws FileSystemException Constructs a new instance.- Parameters:
root- The code source FileObject.resource- The resource of the FileObject.- Throws:
FileSystemException
-
-
Method Details
-
getBytes
Returns the data for this resource as a byte array.- Throws:
IOException
-
getCodeSourceURL
Returns the code source as an URL.- Throws:
FileSystemException
-
getFileObject
Returns the FileObject of the resource. -
getPackageAttribute
Returns an attribute of the package containing the resource.- Throws:
FileSystemException
-
getPackageFolder
Returns the folder for the package containing the resource. -
getPackageName
Returns the name of the package containing the resource. -
getURL
Returns the URL of the resource.- Throws:
FileSystemException
-