Class CentralDirectoryHeaderCompressInfo


  • public class CentralDirectoryHeaderCompressInfo
    extends java.lang.Object
    Information stored in the CentralDirectoryHeader that is related to compression and may need to be computed lazily.
    • Field Detail

      • VERSION_WITH_STORE_FILES_ONLY

        public static final long VERSION_WITH_STORE_FILES_ONLY
        Version of zip file that only supports stored files.
        See Also:
        Constant Field Values
      • VERSION_WITH_DIRECTORIES_AND_DEFLATE

        public static final long VERSION_WITH_DIRECTORIES_AND_DEFLATE
        Version of zip file that only supports directories and deflated files.
        See Also:
        Constant Field Values
      • VERSION_WITH_ZIP64_EXTENSIONS

        public static final long VERSION_WITH_ZIP64_EXTENSIONS
        Version of zip file that only supports ZIP64 format extensions
        See Also:
        Constant Field Values
      • VERSION_WITH_CENTRAL_FILE_ENCRYPTION

        public static final long VERSION_WITH_CENTRAL_FILE_ENCRYPTION
        Version of zip file that uses central file encryption and version 2 of the Zip64 EOCD
        See Also:
        Constant Field Values
    • Constructor Detail

      • CentralDirectoryHeaderCompressInfo

        public CentralDirectoryHeaderCompressInfo​(CompressionMethod method,
                                                  long compressedSize,
                                                  long versionToExtract)
        Creates new compression information for the central directory header.
        Parameters:
        method - the compression method
        compressedSize - the compressed size
        versionToExtract - minimum version to extract (typically VERSION_WITH_STORE_FILES_ONLY or VERSION_WITH_DIRECTORIES_AND_DEFLATE)
      • CentralDirectoryHeaderCompressInfo

        public CentralDirectoryHeaderCompressInfo​(CentralDirectoryHeader header,
                                                  CompressionMethod method,
                                                  long compressedSize)
        Creates new compression information for the central directory header.
        Parameters:
        header - the header this information relates to
        method - the compression method
        compressedSize - the compressed size
    • Method Detail

      • getCompressedSize

        public long getCompressedSize()
        Obtains the compression data size.
        Returns:
        the compressed data size
      • getMethod

        public CompressionMethod getMethod()
        Obtains the compression method.
        Returns:
        the compression method