public class ApacheZipStorage extends java.lang.Object implements ZipFileStorage
Constructor and Description |
---|
ApacheZipStorage(java.nio.file.Path file,
java.nio.charset.Charset encoding) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Restricts the close exception to IOException
|
ZipFileEntry |
getEntry(java.lang.String name)
Returns the entry which matches the given name, where the name must follow
the ZIP conventions.
|
java.util.Iterator<ZipFileEntry> |
lstEntries()
Returns all the entries of this storage
|
java.io.InputStream |
openInputStream(ZipFileEntry entry)
Opens a input stream to the given entry
|
public ApacheZipStorage(java.nio.file.Path file, java.nio.charset.Charset encoding) throws java.io.IOException
java.io.IOException
public java.util.Iterator<ZipFileEntry> lstEntries()
ZipFileStorage
lstEntries
in interface ZipFileStorage
Iterator
public ZipFileEntry getEntry(java.lang.String name)
ZipFileStorage
getEntry
in interface ZipFileStorage
name
- to be used when searching for the entryZipFileEntry
public java.io.InputStream openInputStream(ZipFileEntry entry) throws java.io.IOException
ZipFileStorage
openInputStream
in interface ZipFileStorage
entry
- to which the stream belongsInputStream
java.io.IOException
- if the access to the storage is not allowedpublic void close() throws java.io.IOException
ZipFileStorage
close
in interface ZipFileStorage
close
in interface java.lang.AutoCloseable
java.io.IOException