php.java.bridge
Class DynamicJarURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.JarURLConnection
          extended by php.java.bridge.DynamicJarURLConnection

public class DynamicJarURLConnection
extends java.net.JarURLConnection

This class works around a problem in the URLClassLoader implementation, which fetches remote jar files and caches them forever. This behaviour makes the DynamicClassLoader unusable. This implementation fetches the jar file and caches them until the associated URL is finalized.

Author:
jostb

Method Summary
 void connect()
           
 java.lang.String getHeaderField(java.lang.String key)
           
 java.util.Map getHeaderFields()
           
 java.io.InputStream getInputStream()
           
 java.util.jar.JarFile getJarFile()
           
 long getLastModified()
          Use the original value.
 
Methods inherited from class java.net.JarURLConnection
getAttributes, getCertificates, getEntryName, getJarEntry, getJarFileURL, getMainAttributes, getManifest
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in class java.net.URLConnection
Throws:
java.io.IOException

getHeaderFields

public java.util.Map getHeaderFields()
Overrides:
getHeaderFields in class java.net.URLConnection

getHeaderField

public java.lang.String getHeaderField(java.lang.String key)
Overrides:
getHeaderField in class java.net.URLConnection

getJarFile

public java.util.jar.JarFile getJarFile()
                                 throws java.io.IOException
Specified by:
getJarFile in class java.net.JarURLConnection
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.URLConnection
Throws:
java.io.IOException

getLastModified

public long getLastModified()
Use the original value.

Overrides:
getLastModified in class java.net.URLConnection