Class ZipWriterDecorator

    • Constructor Detail

      • ZipWriterDecorator

        public ZipWriterDecorator​(@NotNull
                                  ZipWriter delegate)
    • Method Detail

      • setArchiveComment

        public final void setArchiveComment​(@Nullable
                                            String comment)
                                     throws IOException
        Description copied from interface: ZipWriter
        Writes a comment to the archive.
        Specified by:
        setArchiveComment in interface ZipWriter
        Parameters:
        comment - the text to write as a comment.
        Throws:
        IOException - fail.
      • createTextFile

        @NotNull
        public Writer createTextFile​(@NotNull
                                     String name,
                                     @Nullable
                                     Charset charset,
                                     long mtimeMillis)
                              throws IOException
        Description copied from interface: ZipWriter

        Creates a new ZIP entry to store plain text data and returns a Writer to it. It's the client's responsibility to close the returned Writer.

        Specified by:
        createTextFile in interface ZipWriter
        Parameters:
        name - the name of the ZIP entry to create (relative path with forward slashes (/)).
        charset - the optional character set to use, or null if the default character set is to be used.
        mtimeMillis - the entry's modification time (@{code mtime}), in milliseconds since epoch.
        Returns:
        the Writer pointing to the newly created ZIP entry. The Writer is already buffered, to there's no need to wrap it into a BufferedWriter.
        Throws:
        ZipException - if a ZIP stream error occurs.
        IOException - if any other I/O error occurs.
        See Also:
        ZipWriter.createTextFile(String, Charset)
      • createBinaryFile

        @NotNull
        public OutputStream createBinaryFile​(@NotNull
                                             String name,
                                             long mtimeMillis)
                                      throws IOException
        Description copied from interface: ZipWriter

        Creates a new ZIP entry to store binary data and returns an OutputStream to it. It's the client's responsibility to close the returned OutputStream.

        Specified by:
        createBinaryFile in interface ZipWriter
        Parameters:
        name - the name of the ZIP entry to create (relative path with forward slashes (/)).
        mtimeMillis - the entry's modification time (@{code mtime}), in milliseconds since epoch.
        Returns:
        the OutputStream pointing to the newly created ZIP entry. The OutputStream is already buffered, to there's no need to wrap it into a BufferedOutputStream.
        Throws:
        ZipException - if a ZIP stream error occurs.
        IOException - if any other I/O error occurs.
        See Also:
        ZipWriter.createBinaryFile(String)