Class JarResourceLoader
java.lang.Object
org.codehaus.plexus.resource.loader.AbstractResourceLoader
org.codehaus.plexus.resource.loader.JarResourceLoader
- All Implemented Interfaces:
ResourceLoader
-
Field Summary
FieldsModifier and TypeFieldDescriptionMaps entries to the parent JAR File (key = the entry *excluding* plain directories, value = the JAR URL).static final String
Maps JAR URLs to the actual JAR (key = the JAR URL, value = the JAR).private static final org.slf4j.Logger
Fields inherited from class org.codehaus.plexus.resource.loader.AbstractResourceLoader
paths
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntries
(Map<String, String> entries) Copy all the entries into the entryDirectory.void
addSearchPath
(String path) private void
Closes a Jar file and set its URLConnection to null.getResource
(String source) Get anPlexusResource
by name.private void
Methods inherited from class org.codehaus.plexus.resource.loader.AbstractResourceLoader
getResourceAsInputStream
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ID
- See Also:
-
entryDirectory
Maps entries to the parent JAR File (key = the entry *excluding* plain directories, value = the JAR URL). -
jarFiles
Maps JAR URLs to the actual JAR (key = the JAR URL, value = the JAR).
-
-
Constructor Details
-
JarResourceLoader
public JarResourceLoader()
-
-
Method Details
-
loadJar
-
closeJar
Closes a Jar file and set its URLConnection to null. -
addEntries
Copy all the entries into the entryDirectory. It will overwrite any duplicate keys. -
getResource
Get anPlexusResource
by name.- Parameters:
source
- name of resource to get- Returns:
- PlexusResource containing the resource
- Throws:
ResourceNotFoundException
- if resource not found.
-
addSearchPath
- Specified by:
addSearchPath
in interfaceResourceLoader
- Overrides:
addSearchPath
in classAbstractResourceLoader
-