public class JavaZipFileHandle extends AbstractZipHandle implements ZipHandle
Modifier and Type | Field and Description |
---|---|
private java.util.zip.ZipFile |
zipFile |
Constructor and Description |
---|
JavaZipFileHandle(java.io.File targetFile) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the zip handle (performs resource cleanup).
|
java.util.List<java.lang.String> |
getEntries()
Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.
|
java.util.List<java.lang.String> |
getEntries(EntryNameFilter filter)
Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.
|
java.io.InputStream |
getEntryContent(java.lang.String path)
Returns the "payload" (uncompressed) of the entry at given path, or null if no such path exists in the Zip file
this handle points to.
|
protected java.util.zip.ZipFile |
getZipFile() |
boolean |
hasEntry(java.lang.String path)
Returns true if Zip file this handle is pointing to contains an entry at given path.
|
getTargetFile
public JavaZipFileHandle(java.io.File targetFile) throws java.io.IOException
java.io.IOException
protected java.util.zip.ZipFile getZipFile()
public boolean hasEntry(java.lang.String path) throws java.io.IOException
ZipHandle
public java.util.List<java.lang.String> getEntries()
ZipHandle
getEntries
in interface ZipHandle
public java.util.List<java.lang.String> getEntries(EntryNameFilter filter)
ZipHandle
getEntries
in interface ZipHandle
public java.io.InputStream getEntryContent(java.lang.String path) throws java.io.IOException
ZipHandle
getEntryContent
in interface ZipHandle
java.io.IOException
public void close() throws java.io.IOException
ZipHandle