com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class ZipFormat

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable


    public final class ZipFormat
    extends FormatBase

    Represents ZIP format. See more: https://en.wikipedia.org/wiki/Zip_(file_format).

    See Also:
    FormatBase
    • Constructor Detail

      • ZipFormat

        public ZipFormat(String fileName)

        Initializes a new instance of the ZipFormat class.

        Parameters:
        fileName - Absolute path to the file.
      • ZipFormat

        public ZipFormat(InputStream input)

        Initializes a new instance of the ZipFormat class.

        Parameters:
        input - File stream.
    • Method Detail

      • getType

        public int getType()

        Gets document type.

        Specified by:
        getType in class FormatBase
        Returns:
        Document type.
      • getZipInfo

        public final ZipMetadata getZipInfo()

        Gets common ZIP information like total entries, user's comment.

        Returns:
        The ZIP information.
      • getZipFileComment

        public final String getZipFileComment()

        Gets the user's comment to the archive.

        Returns:
        The zip file comment.
      • setZipFileComment

        public final void setZipFileComment(String value)

        Sets the user's comment to the archive.

        Parameters:
        value - The zip file comment.
      • getFiles

        public final ZipFileInfo[] getFiles()

        Gets the array of files and directories inside ZIP archive.

        Returns:
        The array of entries inside ZIP.
      • cleanMetadata

        public void cleanMetadata()

        Removes ZIP metadata. Current version supports user's comment only. See more RemoveFileComment.


        This feature is not supported in trial mode.

        Overrides:
        cleanMetadata in class FormatBase
      • removeFileComment

        public final void removeFileComment()

        Removes user's file comment. The comment is related to the whole archive.


        This feature is not available in trial mode.