class Resource
extends java.lang.Object
VFSClassLoader
Modifier and Type | Field and Description |
---|---|
private FileObject |
packageFolder |
private java.lang.String |
packageName |
private FileObject |
resource |
private FileObject |
root |
Constructor and Description |
---|
Resource(java.lang.String name,
FileObject root,
FileObject resource)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Returns the data for this resource as a byte array.
|
java.net.URL |
getCodeSourceURL()
Returns the code source as an URL.
|
FileObject |
getFileObject()
Returns the FileObject of the resource.
|
java.lang.String |
getPackageAttribute(java.util.jar.Attributes.Name attrName)
Returns an attribute of the package containing the resource.
|
FileObject |
getPackageFolder()
Returns the folder for the package containing the resource.
|
java.lang.String |
getPackageName()
Returns the name of the package containing the resource.
|
java.net.URL |
getURL()
Returns the URL of the resource.
|
private final FileObject root
private final FileObject resource
private final FileObject packageFolder
private final java.lang.String packageName
public Resource(java.lang.String name, FileObject root, FileObject resource) throws FileSystemException
root
- The code source FileObject.resource
- The resource of the FileObject.FileSystemException
public java.net.URL getURL() throws FileSystemException
FileSystemException
public java.lang.String getPackageName()
public java.lang.String getPackageAttribute(java.util.jar.Attributes.Name attrName) throws FileSystemException
FileSystemException
public FileObject getPackageFolder()
public FileObject getFileObject()
public java.net.URL getCodeSourceURL() throws FileSystemException
FileSystemException
public byte[] getBytes() throws java.io.IOException
java.io.IOException