| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceHandle
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 | 
|---|
String getName()
URL getUrl()
boolean isDirectory()
URL getCodeSourceUrl()
InputStream getInputStream()
                           throws IOException
IOExceptionint getContentLength()
byte[] getBytes()
                throws IOException
IOException
Manifest getManifest()
                     throws IOException
IOExceptionCertificate[] getCertificates()
Attributes getAttributes()
                         throws IOException
IOExceptionvoid close()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||