public class ZipInputSupplier extends java.lang.Object implements InputSupplier
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap<java.lang.String,byte[]> |
data |
protected java.lang.String |
root |
| Constructor and Description |
|---|
ZipInputSupplier() |
ZipInputSupplier(java.io.File zip) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.util.List<java.lang.String> |
gatherAll(java.lang.String endFilter)
Gathers all the names of all the resources with the given ending in their name.
|
java.io.InputStream |
getInput(java.lang.String relPath)
Opens an input stream to the specified resource.
|
java.lang.String |
getRoot(java.lang.String resource)
The absolute path of the root entity of the given resource, be it a file or directory.
|
void |
readZip(java.io.File zip) |
protected final java.util.HashMap<java.lang.String,byte[]> data
protected java.lang.String root
public ZipInputSupplier()
public ZipInputSupplier(java.io.File zip)
throws java.io.IOException
java.io.IOExceptionpublic void readZip(java.io.File zip)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.io.InputStream getInput(java.lang.String relPath)
InputSuppliergetInput in interface InputSupplierrelPath - Reative path seperated with '/' and having no preceding slash.public java.util.List<java.lang.String> gatherAll(java.lang.String endFilter)
InputSuppliergatherAll in interface InputSupplierendFilter - Filter to match the end of files namespublic java.lang.String getRoot(java.lang.String resource)
InputSuppliergetRoot in interface InputSupplierresource - The resource to find the root for