Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.emory.mathcs.util.classloader
Class ResourceLoader.JarResourceHandle  view ResourceLoader.JarResourceHandle download ResourceLoader.JarResourceHandle.java

java.lang.Object
  extended byedu.emory.mathcs.util.classloader.ResourceHandle
      extended byedu.emory.mathcs.util.classloader.ResourceLoader.JarResourceHandle
Enclosing class:
ResourceLoader

private static class ResourceLoader.JarResourceHandle
extends ResourceHandle


Field Summary
(package private)  java.net.URL codeSource
           
(package private)  java.util.jar.JarFile jar
           
(package private)  java.util.jar.JarEntry jentry
           
(package private)  java.net.URL url
           
 
Constructor Summary
(package private) ResourceLoader.JarResourceHandle(java.util.jar.JarFile jar, java.util.jar.JarEntry jentry, java.net.URL url, java.net.URL codeSource)
           
 
Method Summary
 void close()
          Closes a connection to the resource indentified by this handle.
 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.lang.String getName()
          Return the name of the resource.
 java.net.URL getURL()
          Returns the URL of the resource.
 
Methods inherited from class edu.emory.mathcs.util.classloader.ResourceHandle
getAttributes, getBytes, getCertificates, getManifest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jar

final java.util.jar.JarFile jar

jentry

final java.util.jar.JarEntry jentry

url

final java.net.URL url

codeSource

final java.net.URL codeSource
Constructor Detail

ResourceLoader.JarResourceHandle

ResourceLoader.JarResourceHandle(java.util.jar.JarFile jar,
                                 java.util.jar.JarEntry jentry,
                                 java.net.URL url,
                                 java.net.URL codeSource)
Method Detail

getName

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

Specified by:
getName in class ResourceHandle

getURL

public java.net.URL getURL()
Description copied from class: ResourceHandle
Returns the URL of the resource.

Specified by:
getURL in class ResourceHandle

getCodeSourceURL

public java.net.URL getCodeSourceURL()
Description copied from class: ResourceHandle
Returns the CodeSource URL for the class or resource.

Specified by:
getCodeSourceURL in class ResourceHandle

getInputStream

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

Specified by:
getInputStream in class ResourceHandle

getContentLength

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

Specified by:
getContentLength in class ResourceHandle

close

public void close()
Description copied from class: ResourceHandle
Closes a connection to the resource indentified by this handle. Releases any I/O objects associated with the handle.

Overrides:
close in class ResourceHandle