Package com.e1c.g5.v8.internal.fastzip
Class ParallelFzipReader
java.lang.Object
com.e1c.g5.v8.internal.fastzip.ParallelFzipReader
- All Implemented Interfaces:
- IFzipReader,- Closeable,- AutoCloseable
Implementation of 
IFzipReader, which supports parallel decompression.- 
Constructor SummaryConstructorsConstructorDescriptionParallelFzipReader(Path archPath, IFzipEntryRegistry registry, int numWorkers, boolean memoryMapped) Constructs a new parallel FastZIP reader.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()intGets the number of entries contained in the archive.entries()Gets a stream of entry descriptors contained in the archive.voidread()Restores all entries from the archive.voidsetProgressListener(IProgressListener progressListener) Sets a progress listener.
- 
Constructor Details- 
ParallelFzipReaderpublic ParallelFzipReader(Path archPath, IFzipEntryRegistry registry, int numWorkers, boolean memoryMapped) throws IOException Constructs a new parallel FastZIP reader.- Parameters:
- archPath- the path to the FastZIP archive, cannot be- null
- registry- the FastZIP entry registry, cannot be- null
- numWorkers- number of threads to be used for decompression, must be positive
- memoryMapped- whether memory mapped IO shall be used
- Throws:
- IOException- if the file could not be opened
 
 
- 
- 
Method Details- 
setProgressListenerDescription copied from interface:IFzipReaderSets a progress listener. The listener is used to track progress ofIFzipReader.read()operation.- Specified by:
- setProgressListenerin interface- IFzipReader
- Parameters:
- progressListener- the progress listener, or- nullto remove a previously set listener
 
- 
readDescription copied from interface:IFzipReaderRestores 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. - Specified by:
- readin interface- IFzipReader
- Throws:
- FzipException- if the source file is not a FastZIP archive, the archive is corrupted or written with incompatible registry
- IOException- if an IO error occurs
 
- 
countEntriesDescription copied from interface:IFzipReaderGets the number of entries contained in the archive.- Specified by:
- countEntriesin interface- IFzipReader
- Returns:
- the number of entries
- Throws:
- FzipException- if the source file is not a FastZIP archive, the archive is corrupted or written with incompatible registry
- IOException- if an IO error occurs
 
- 
entriesDescription copied from interface:IFzipReaderGets a stream of entry descriptors contained in the archive. This method does not restore the entry contents.- Specified by:
- entriesin interface- IFzipReader
- 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 registry
- IOException- if an IO error occurs
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
-