Class CachedJarFileCallback

java.lang.Object
net.sourceforge.jnlp.runtime.CachedJarFileCallback

public final class CachedJarFileCallback extends Object
Invoked by URLJarFile to get a JarFile corresponding to a URL. Large parts of this class are based on JarFileFactory and URLJarFile. Hooked in reflectively: sun.net.www.protocol.jar.URLJarFileCallBack is gone in newer JDKs.
  • Field Details

  • Constructor Details

    • CachedJarFileCallback

      private CachedJarFileCallback()
  • Method Details

    • getInstance

      public static CachedJarFileCallback getInstance()
    • addMapping

      public void addMapping(URL remoteUrl, URL localUrl)
    • register

      public static void register()
      Registers this as URLJarFile callback. No-op on JDKs without URLJarFileCallBack; remote jar: URLs are then fetched by the JDK itself, bypassing the ITW cache.
    • retrieve

      public JarFile retrieve(URL url) throws IOException
      Throws:
      IOException
    • cacheJarFile

      private JarFile cacheJarFile(URL url) throws IOException
      Throws:
      IOException