|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This is a handle (a connection) to some resource, which may
be a class, native library, text file, image, etc. Handles are returned
by a ResourceFinder. A resource handle allows easy access to the resource data
(using methods getInputStream() or getBytes()) as well as
access resource metadata, such as attributes, certificates, etc.
close()d, similarly to I/O streams.
| Method Summary | |
void |
close()
Closes a connection to the resource indentified by this handle. |
Attributes |
getAttributes()
Return the Attributes of the resource, or null if none. |
byte[] |
getBytes()
Returns this resource data as an array of bytes. |
Certificate[] |
getCertificates()
Return the Certificates of the resource, or null if none. |
URL |
getCodeSourceUrl()
Returns the CodeSource URL for the class or resource. |
int |
getContentLength()
Returns the length of this resource data, or -1 if unknown. |
InputStream |
getInputStream()
Returns and InputStream for reading this resource data. |
Manifest |
getManifest()
Returns the Manifest of the JAR file from which this resource was loaded, or null if none. |
String |
getName()
Return the name of the resource. |
URL |
getUrl()
Returns the URL of the resource. |
boolean |
isDirectory()
Does this resource refer to a directory. |
| Method Detail |
public String getName()
public URL getUrl()
public boolean isDirectory()
public URL getCodeSourceUrl()
public InputStream getInputStream()
throws IOException
IOExceptionpublic int getContentLength()
public byte[] getBytes()
throws IOException
IOException
public Manifest getManifest()
throws IOException
IOExceptionpublic Certificate[] getCertificates()
public Attributes getAttributes()
throws IOException
IOExceptionpublic void close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||