Class JarFactory


  • public class JarFactory
    extends java.lang.Object
    Provide a mechanism to obtain objects that implement Jar.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URL getJarEntryURL​(java.net.URL baseUrl, java.lang.String entryName)
      Get a JAR entry URL for the given base URL and entry name.
      static Jar newInstance​(java.net.URL url)
      Create a new Jar instance for the given URL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newInstance

        public static Jar newInstance​(java.net.URL url)
                               throws java.io.IOException
        Create a new Jar instance for the given URL.
        Parameters:
        url - the URL of the JAR file
        Returns:
        the new Jar instance
        Throws:
        java.io.IOException - if an I/O error occurs
      • getJarEntryURL

        public static java.net.URL getJarEntryURL​(java.net.URL baseUrl,
                                                  java.lang.String entryName)
                                           throws java.net.MalformedURLException
        Get a JAR entry URL for the given base URL and entry name.
        Parameters:
        baseUrl - the base URL of the JAR
        entryName - the name of the entry
        Returns:
        the URL for the JAR entry
        Throws:
        java.net.MalformedURLException - if an I/O error occurs