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 a ZIP archive.

    • Constructor Detail

      • ZipFormat

        public ZipFormat(String fileName)

        Initializes a new instance of the ZipFormat class.

        Parameters:
        fileName - A string that contains the full name of the file from which to create a ZipFormat instance.
      • ZipFormat

        public ZipFormat(InputStream input)

        Initializes a new instance of the ZipFormat class.

        Parameters:
        input - A stream that contains the data for this ZipFormat.
    • Method Detail

      • getType

        public int getType()

        Gets the type of the loaded file.

        Specified by:
        getType in class FormatBase
        Returns:
        The type of the loaded file.
      • getZipInfo

        public final ZipMetadata getZipInfo()

        Gets the metadata extracted from the ZIP file.

        Returns:
        The ZIP information.
      • getZipFileComment

        public final String getZipFileComment()

        Gets the user's comment to the archive.

        Returns:
        The user's comment to the archive.
      • setZipFileComment

        public final void setZipFileComment(String value)

        Sets the user's comment to the archive.

        Parameters:
        value - The user's comment to the archive.
      • getFiles

        public final ZipFileInfo[] getFiles()

        Gets an array that contains information about the archived files and directories.

        Returns:
        An array that contains information about the archived files and directories.
      • cleanMetadata

        public void cleanMetadata()

        Removes writable metadata properties associated with the file. Currently, only the archive file comment is cleaned.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class FormatBase
      • removeFileComment

        public final void removeFileComment()

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


        This feature is not available in trial mode.