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 StringMaps JAR URLs to the actual JAR (key = the JAR URL, value = the JAR).private static final org.slf4j.LoggerFields inherited from class org.codehaus.plexus.resource.loader.AbstractResourceLoader
paths -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEntries(Map<String, String> entries) Copy all the entries into the entryDirectory.voidaddSearchPath(String path) private voidCloses a Jar file and set its URLConnection to null.getResource(String source) Get anPlexusResourceby name.private voidMethods 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 anPlexusResourceby name.- Parameters:
source- name of resource to get- Returns:
- PlexusResource containing the resource
- Throws:
ResourceNotFoundException- if resource not found.
-
addSearchPath
- Specified by:
addSearchPathin interfaceResourceLoader- Overrides:
addSearchPathin classAbstractResourceLoader
-