|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.impl.Resource
class Resource
Helper class for VFSClassLoader. This represents a resource loaded with the classloader.
VFSClassLoader
Field Summary | |
---|---|
private FileObject |
packageFolder
|
private java.lang.String |
packageName
|
private FileObject |
resource
|
private FileObject |
root
|
Constructor Summary | |
---|---|
Resource(java.lang.String name,
FileObject root,
FileObject resource)
Creates a new instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final FileObject root
private final FileObject resource
private final FileObject packageFolder
private final java.lang.String packageName
Constructor Detail |
---|
public Resource(java.lang.String name, FileObject root, FileObject resource) throws FileSystemException
root
- The code source FileObject.resource
- The resource of the FileObject.
FileSystemException
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |