edu.emory.mathcs.util.classloader.jar
Class JarProxy

java.lang.Object
  extended byedu.emory.mathcs.util.classloader.jar.JarProxy
All Implemented Interfaces:
JarURLConnection.JarOpener

public class JarProxy
extends java.lang.Object
implements JarURLConnection.JarOpener

Implementation of JarURLConnection.JarOpener that caches downloaded JAR files in a local file system.

Version:
1.0
Author:
Dawid Kurzyniec
See Also:
JarURLConnection, JarURLStreamHandler

Constructor Summary
JarProxy()
           
 
Method Summary
protected  void clear()
           
protected  void finalize()
           
protected  java.io.InputStream getJarInputStream(java.net.URLConnection conn)
           
 java.util.jar.JarFile openJarFile(java.net.JarURLConnection conn)
          Given the URL connection (not yet connected), return JarFile representing the resource.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarProxy

public JarProxy()
Method Detail

openJarFile

public java.util.jar.JarFile openJarFile(java.net.JarURLConnection conn)
                                  throws java.io.IOException
Description copied from interface: JarURLConnection.JarOpener
Given the URL connection (not yet connected), return JarFile representing the resource. This method is invoked as a part of the JarURLConnection.connect() method in JarURLConnection.

Specified by:
openJarFile in interface JarURLConnection.JarOpener
Parameters:
conn - the connection for which the JAR file is required
Returns:
opened JAR file
Throws:
java.io.IOException - if I/O error occurs

getJarInputStream

protected java.io.InputStream getJarInputStream(java.net.URLConnection conn)
                                         throws java.io.IOException
Throws:
java.io.IOException

clear

protected void clear()

finalize

protected void finalize()