Package com.e1c.g5.v8.fastzip
Interface IFzipReader
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
ParallelFzipReader
FastZIP archive reader.
All methods are synchronous and can be called in any order any number of times.
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of entries contained in the archive.entries()
Gets a stream of entry descriptors contained in the archive.void
read()
Restores all entries from the archive.void
setProgressListener
(IProgressListener progressListener) Sets a progress listener.
-
Method Details
-
setProgressListener
Sets a progress listener. The listener is used to track progress ofread()
operation.- Parameters:
progressListener
- the progress listener, ornull
to remove a previously set listener
-
read
Restores all entries from the archive. Reports the progress to a progress listener if it was set. The order in which the entries are restored is not specified.If the operation fails the reader might end up in a closed state and no guarantees on which entries were fully or partially read are provided.
- Throws:
FzipException
- if the source file is not a FastZIP archive, the archive is corrupted or written with incompatible registryIOException
- if an IO error occurs
-
countEntries
Gets the number of entries contained in the archive.- Returns:
- the number of entries
- Throws:
FzipException
- if the source file is not a FastZIP archive, the archive is corrupted or written with incompatible registryIOException
- if an IO error occurs
-
entries
Gets a stream of entry descriptors contained in the archive. This method does not restore the entry contents.- Returns:
- the stream of FastZIP entries, never
null
- Throws:
FzipException
- if the source file is not a FastZIP archive, the archive is corrupted or written with incompatible registryIOException
- if an IO error occurs
-