Interface IFzipWriter

  • All Superinterfaces:
    AutoCloseable, Closeable

    public interface IFzipWriter
    extends Closeable
    FastZIP archive writer.

    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 write(IFzipEntry[]) operation.
        Parameters:
        progressListener - the progress listener, or null to remove a previously set listener
      • write

        void write​(IFzipEntry[] entries)
            throws IOException
        Writes entries to the archive. The entries must belong to the registry of this writer. Reports the progress to a progress listener if it was set.

        If the operation fails the writer might end up in a closed state and no guarantees on the contents and consistency of the archive are provided.

        Parameters:
        entries - the entries, cannot be null, cannot contain null values
        Throws:
        FzipException - if the writer failed to compress the entries for any reason
        IOException - if an IO error occurs