org.hibernate.ejb.packaging
Class JarVisitorFactory
java.lang.Object
org.hibernate.ejb.packaging.JarVisitorFactory
public class JarVisitorFactory
- extends Object
- Author:
- Emmanuel Bernard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JarVisitorFactory
public JarVisitorFactory()
getJarURLFromURLEntry
public static URL getJarURLFromURLEntry(URL url,
String entry)
throws IllegalArgumentException
- Get the JAR URL of the JAR containing the given entry
Method used in a non managed environment
- Parameters:
url
- URL pointing to the known file in the JARentry
- file known to be in the JAR
- Returns:
- the JAR URL
- Throws:
IllegalArgumentException
- if none URL is found
getVisitor
public static JarVisitor getVisitor(String jarPath,
Filter[] filters)
throws IllegalArgumentException
- Get a JarVisitor to the jar
jarPath
applying the given filters
Method used in a non-managed environment
- Throws:
IllegalArgumentException
- if the jarPath is incorrect
getVisitor
public static JarVisitor getVisitor(URL jarUrl,
Filter[] filters)
throws IllegalArgumentException
- Build a JarVisitor on the given JAR URL applying the given filters
- Throws:
IllegalArgumentException
- if the URL is malformed
getVisitor
public static JarVisitor getVisitor(URL jarUrl,
Filter[] filters,
String entry)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getBytesFromInputStream
public static byte[] getBytesFromInputStream(InputStream inputStream)
throws IOException
- Throws:
IOException