Custom Jar file caching using Manifests
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alon_Kronenberg
Posted On:   Friday, May 31, 2002 11:24 AM

I have created my own classloader, based on URLClassLoader, to run an applet. The applet is packaged in several JAR files that are accessible on a HTTP server. Each Jar file is versioned in its Manifest as per Sun specs. I want my classloader to be able to cache the applet's JAR files so they don't need to be downloaded every time. I thought that I could use JarURLConnection.getManifest() to retrieve the JAR's Manifest from the Server and compare it to the local copy, but based on some tests it appears that JarURLConnection is downloading the whole JAR file in order to retrieve the Manifest, which kinda defeats the purpose. I also though about comparing file sizes + last modified dates, but I don't seem to g   More>>

I have created my own classloader, based on URLClassLoader,
to run an applet. The applet is packaged in several JAR files that are accessible on a HTTP server. Each Jar file is versioned in its Manifest as per Sun specs.


I want my classloader to be able to cache the applet's JAR files so they don't need to be downloaded every time. I thought that I could use JarURLConnection.getManifest() to retrieve the JAR's Manifest from the Server and compare it to the local copy, but based on some tests it appears that JarURLConnection is downloading the whole JAR file in order to retrieve the Manifest, which kinda defeats the purpose.


I also though about comparing file sizes + last modified dates, but I don't seem to get any of the date information from URLConnection.getLastModified() .


Any ideas?


Thanks

   <<Less
About | Sitemap | Contact