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).
|
pathsROLE| 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) |
getResourceAsInputStreampublic 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.InitializationExceptionprivate 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 ResourceLoaderaddSearchPath in class AbstractResourceLoader