# Class JarFactory

java.lang.Object
org.apache.tomcat.util.scan.JarFactory

public class JarFactory extends Object
Provide a mechanism to obtain objects that implement `Jar`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static URL`
  `getJarEntryURL(URL baseUrl, String entryName)`
  Get a JAR entry URL for the given base URL and entry name.
  `static Jar`
  `newInstance(URL url)`
  Create a new `Jar` instance for the given URL.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### newInstance

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

  - ### getJarEntryURL

    public static URL getJarEntryURL(URL baseUrl, String entryName) throws 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:
      `MalformedURLException` - if an I/O error occurs