Package org.apache.tomcat.util.scan
Class JarFactory
- java.lang.Object
-
- org.apache.tomcat.util.scan.JarFactory
-
public class JarFactory extends java.lang.ObjectProvide a mechanism to obtain objects that implementJar.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.net.URLgetJarEntryURL(java.net.URL baseUrl, java.lang.String entryName)Get a JAR entry URL for the given base URL and entry name.static JarnewInstance(java.net.URL url)Create a newJarinstance for the given URL.
-
-
-
Method Detail
-
newInstance
public static Jar newInstance(java.net.URL url) throws java.io.IOException
Create a newJarinstance 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.MalformedURLExceptionGet a JAR entry URL for the given base URL and entry name.- Parameters:
baseUrl- the base URL of the JARentryName- the name of the entry- Returns:
- the URL for the JAR entry
- Throws:
java.net.MalformedURLException- if an I/O error occurs
-
-