net.groboclown.util.jplugin.v2
Class JarFileInspector
java.lang.Object
|
+--net.groboclown.util.jplugin.v2.JarFileInspector
- All Implemented Interfaces:
- IFileInspector
- public class JarFileInspector
- extends Object
- implements IFileInspector
Examines a given Jar, and adds it to the correct list based
on its attributes.
- Version:
- 0.9.0 Alpha
- Author:
- Matt Albrecht
Method Summary |
protected boolean |
checkName(String name)
|
void |
discoverFile(File f,
ClassCollection cc,
ILocationSearcher ils,
File baseFile)
Examine the given File, and call the correct collection method
to store it. |
void |
discoverURL(URL url,
ClassCollection cc,
ILocationSearcher ils,
URL baseUrl)
Examine the given URL, and call the correct collection method
to store it. |
protected void |
searchJar(JarInputStream jis,
URL baseUrl,
ClassCollection cc,
ILocationSearcher ils)
Search the entire jar file for entries. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
JAR_EXTENSIONS
private static final String[] JAR_EXTENSIONS
JarFileInspector
public JarFileInspector()
- Default Constructor
discoverURL
public void discoverURL(URL url,
ClassCollection cc,
ILocationSearcher ils,
URL baseUrl)
throws IOException
- Examine the given URL, and call the correct collection method
to store it.
- Specified by:
discoverURL
in interface IFileInspector
discoverFile
public void discoverFile(File f,
ClassCollection cc,
ILocationSearcher ils,
File baseFile)
throws IOException
- Examine the given File, and call the correct collection method
to store it.
- Specified by:
discoverFile
in interface IFileInspector
checkName
protected boolean checkName(String name)
searchJar
protected void searchJar(JarInputStream jis,
URL baseUrl,
ClassCollection cc,
ILocationSearcher ils)
throws IOException
- Search the entire jar file for entries. This starts a recursive
effort through the file identifiers, and the JarFileInspector looks
more like a Searcher.
Written under the LGPL