public class JarResources extends java.lang.Object
Constructor and Description |
---|
JarResources()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,byte[]> |
getLoadedResources()
Returns an immutable Map of all loaded jar resources
|
java.net.URL |
getResource(java.lang.String name) |
byte[] |
getResourceContent(java.lang.String name) |
java.util.Map<java.lang.String,java.net.URL> |
getResources()
Returns an immutable Map of all resources
|
java.util.Set<java.lang.String> |
getResourcesName()
Returns an immutable Set of all resources names
|
void |
loadJar(java.io.File file)
Loads the jar file from a specified File.
|
void |
loadJar(java.net.URL url)
Loads the jar file from a specified URL.
|
public JarResources()
public java.net.URL getResource(java.lang.String name)
public byte[] getResourceContent(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.util.Set<java.lang.String> getResourcesName()
public java.util.Map<java.lang.String,java.net.URL> getResources()
public java.util.Map<java.lang.String,byte[]> getLoadedResources()
public void loadJar(java.io.File file) throws java.io.IOException
java.io.IOException
public void loadJar(java.net.URL url) throws java.io.IOException
java.io.IOException