Class CachedJarFileCallback


  • public final class CachedJarFileCallback
    extends java.lang.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.
    • Constructor Detail

      • CachedJarFileCallback

        private CachedJarFileCallback()
    • Method Detail

      • addMapping

        public void addMapping​(java.net.URL remoteUrl,
                               java.net.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 java.util.jar.JarFile retrieve​(java.net.URL url)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • cacheJarFile

        private java.util.jar.JarFile cacheJarFile​(java.net.URL url)
                                            throws java.io.IOException
        Throws:
        java.io.IOException