public class JarVisitorFactory extends Object
Constructor and Description |
---|
JarVisitorFactory() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
getBytesFromInputStream(InputStream inputStream) |
static URL |
getJarURLFromURLEntry(URL url,
String entry)
Get the JAR URL of the JAR containing the given entry
Method used in a non managed environment
|
static URL |
getURLFromPath(String jarPath)
get the URL from a given path string
|
static JarVisitor |
getVisitor(String jarPath,
Filter[] filters)
Get a JarVisitor to the jar
jarPath applying the given filters
Method used in a non-managed environment |
static JarVisitor |
getVisitor(URL jarUrl,
Filter[] filters)
Build a JarVisitor on the given JAR URL applying the given filters
|
static JarVisitor |
getVisitor(URL jarUrl,
Filter[] filters,
String entry) |
public static URL getJarURLFromURLEntry(URL url, String entry) throws IllegalArgumentException
url
- URL pointing to the known file in the JARentry
- file known to be in the JARIllegalArgumentException
- if none URL is found
TODO move to a ScannerHelper service?public static URL getURLFromPath(String jarPath)
IllegalArgumentException
- is something goes wrong
TODO move to a ScannerHelper service?public static JarVisitor getVisitor(String jarPath, Filter[] filters) throws IllegalArgumentException
jarPath
applying the given filters
Method used in a non-managed environmentIllegalArgumentException
- if the jarPath is incorrectpublic static JarVisitor getVisitor(URL jarUrl, Filter[] filters) throws IllegalArgumentException
IllegalArgumentException
- if the URL is malformedpublic static JarVisitor getVisitor(URL jarUrl, Filter[] filters, String entry) throws IllegalArgumentException
IllegalArgumentException
public static byte[] getBytesFromInputStream(InputStream inputStream) throws IOException
IOException
Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.