public class JarResourceLoader extends AbstractResourceLoader
Modifier and Type | Field and Description |
---|---|
private java.util.Map |
entryDirectory
Maps entries to the parent JAR File (key = the entry *excluding* plain directories, value = the JAR URL).
|
static java.lang.String |
ID |
private boolean |
initializeCalled |
private java.util.Map |
jarfiles
Maps JAR URLs to the actual JAR (key = the JAR URL, value = the JAR).
|
paths
ROLE
Constructor and Description |
---|
JarResourceLoader() |
Modifier and Type | Method and Description |
---|---|
private void |
addEntries(java.util.Map entries)
Copy all the entries into the entryDirectory.
|
void |
addSearchPath(java.lang.String path) |
private void |
closeJar(java.lang.String path)
Closes a Jar file and set its URLConnection to null.
|
PlexusResource |
getResource(java.lang.String source)
Get an InputStream so that the Runtime can build a template with it.
|
void |
initialize() |
private void |
loadJar(java.lang.String path) |
getResourceAsInputStream
public static final java.lang.String ID
private java.util.Map entryDirectory
private java.util.Map jarfiles
private boolean initializeCalled
public void initialize() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
private void loadJar(java.lang.String path)
private void closeJar(java.lang.String path)
private void addEntries(java.util.Map entries)
public PlexusResource getResource(java.lang.String source) throws ResourceNotFoundException
source
- name of template to getResourceNotFoundException
- if template not found in the file template path.public void addSearchPath(java.lang.String path)
addSearchPath
in interface ResourceLoader
addSearchPath
in class AbstractResourceLoader