public class ZipResourceLoader extends java.lang.Object implements PluginResourceLoader
Constructor and Description |
---|
ZipResourceLoader(java.io.File cacheDir,
java.io.File zipFile,
java.util.List<java.lang.String> resourcesList,
java.lang.String resourcesBasedir) |
Modifier and Type | Method and Description |
---|---|
void |
extractResources()
Extract resources return the extracted files
|
java.lang.String[] |
getResourceNames()
Get the list of resources in the jar
|
java.util.List<java.lang.String> |
listResources() |
java.io.InputStream |
openResourceStreamFor(java.lang.String path)
Open a stream to load a resource
|
public ZipResourceLoader(java.io.File cacheDir, java.io.File zipFile, java.util.List<java.lang.String> resourcesList, java.lang.String resourcesBasedir)
public java.util.List<java.lang.String> listResources()
listResources
in interface PluginResourceLoader
public java.lang.String[] getResourceNames()
public java.io.InputStream openResourceStreamFor(java.lang.String path) throws PluginException, java.io.IOException
PluginResourceLoader
openResourceStreamFor
in interface PluginResourceLoader
path
- resource path and namePluginException
- if a path is requested that was not in the pluginjava.io.IOException
- if an error occurspublic void extractResources() throws java.io.IOException
java.io.IOException