Interface IFzipReader

  • All Superinterfaces:
    AutoCloseable, Closeable

    public interface IFzipReader
    extends Closeable
    FastZIP archive reader.

    All methods are synchronous and can be called in any order any number of times.

    • Method Detail

      • setProgressListener

        void setProgressListener​(IProgressListener progressListener)
        Sets a progress listener. The listener is used to track progress of read() operation.
        Parameters:
        progressListener - the progress listener, or null to remove a previously set listener
      • read

        void read()
           throws IOException
        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 registry
        IOException - if an IO error occurs
      • countEntries

        int countEntries()
                  throws IOException
        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 registry
        IOException - if an IO error occurs
      • entries

        Stream<IFzipEntry> entries()
                            throws IOException
        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 registry
        IOException - if an IO error occurs