org.apache.xbean.classloader
public interface ResourceHandle
getInputStream()
or getBytes()
) as well as
access resource metadata, such as attributes, certificates, etc.
As soon as the handle is no longer in use, it should be explicitly
close()
d, similarly to I/O streams.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes a connection to the resource indentified by this handle.
|
java.util.jar.Attributes |
getAttributes()
Return the Attributes of the resource, or null if none.
|
byte[] |
getBytes()
Returns this resource data as an array of bytes.
|
java.security.cert.Certificate[] |
getCertificates()
Return the Certificates of the resource, or null if none.
|
java.net.URL |
getCodeSourceUrl()
Returns the CodeSource URL for the class or resource.
|
int |
getContentLength()
Returns the length of this resource data, or -1 if unknown.
|
java.io.InputStream |
getInputStream()
Returns and InputStream for reading this resource data.
|
java.util.jar.Manifest |
getManifest()
Returns the Manifest of the JAR file from which this resource
was loaded, or null if none.
|
java.lang.String |
getName()
Return the name of the resource.
|
java.net.URL |
getUrl()
Returns the URL of the resource.
|
boolean |
isDirectory()
Does this resource refer to a directory.
|
java.lang.String getName()
java.net.URL getUrl()
boolean isDirectory()
java.net.URL getCodeSourceUrl()
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
int getContentLength()
byte[] getBytes() throws java.io.IOException
java.io.IOException
java.util.jar.Manifest getManifest() throws java.io.IOException
java.io.IOException
java.security.cert.Certificate[] getCertificates()
java.util.jar.Attributes getAttributes() throws java.io.IOException
java.io.IOException
void close()
Copyright © 2005-2016. All Rights Reserved.