org.apache.geronimo.kernel.classloader
Class JarResourceHandle

java.lang.Object
  extended by org.apache.geronimo.kernel.classloader.AbstractResourceHandle
      extended by org.apache.geronimo.kernel.classloader.JarResourceHandle
All Implemented Interfaces:
ResourceHandle

public class JarResourceHandle
extends AbstractResourceHandle


Constructor Summary
JarResourceHandle(JarFile jarFile, JarEntry jarEntry, URL codeSource)
           
 
Method Summary
 Attributes getAttributes()
          Return the Attributes of the resource, or null if none.
 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.
 
Methods inherited from class org.apache.geronimo.kernel.classloader.AbstractResourceHandle
close, getBytes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JarResourceHandle

public JarResourceHandle(JarFile jarFile,
                         JarEntry jarEntry,
                         URL codeSource)
                  throws MalformedURLException
Throws:
MalformedURLException
Method Detail

getName

public String getName()
Description copied from interface: ResourceHandle
Return the name of the resource. The name is a "/"-separated path name that identifies the resource.


getUrl

public URL getUrl()
Description copied from interface: ResourceHandle
Returns the URL of the resource.


getCodeSourceUrl

public URL getCodeSourceUrl()
Description copied from interface: ResourceHandle
Returns the CodeSource URL for the class or resource.


isDirectory

public boolean isDirectory()
Description copied from interface: ResourceHandle
Does this resource refer to a directory. Directory resources are commly used as the basis for a URL in client application. A directory resource has 0 bytes for it's content.


getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: ResourceHandle
Returns and InputStream for reading this resource data.

Throws:
IOException

getContentLength

public int getContentLength()
Description copied from interface: ResourceHandle
Returns the length of this resource data, or -1 if unknown.


getManifest

public Manifest getManifest()
                     throws IOException
Description copied from interface: ResourceHandle
Returns the Manifest of the JAR file from which this resource was loaded, or null if none.

Specified by:
getManifest in interface ResourceHandle
Overrides:
getManifest in class AbstractResourceHandle
Throws:
IOException

getAttributes

public Attributes getAttributes()
                         throws IOException
Description copied from interface: ResourceHandle
Return the Attributes of the resource, or null if none.

Specified by:
getAttributes in interface ResourceHandle
Overrides:
getAttributes in class AbstractResourceHandle
Throws:
IOException

getCertificates

public Certificate[] getCertificates()
Description copied from interface: ResourceHandle
Return the Certificates of the resource, or null if none.

Specified by:
getCertificates in interface ResourceHandle
Overrides:
getCertificates in class AbstractResourceHandle


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.