public class CentralDirectoryHeaderCompressInfo
extends java.lang.Object
CentralDirectoryHeader that is related to compression and may
need to be computed lazily.| Modifier and Type | Field and Description |
|---|---|
static long |
VERSION_WITH_DIRECTORIES_AND_DEFLATE
Version of zip file that only supports directories and deflated files.
|
static long |
VERSION_WITH_STORE_FILES_ONLY
Version of zip file that only supports stored files.
|
| Constructor and Description |
|---|
CentralDirectoryHeaderCompressInfo(CentralDirectoryHeader header,
CompressionMethod method,
long compressedSize)
Creates new compression information for the central directory header.
|
CentralDirectoryHeaderCompressInfo(CompressionMethod method,
long compressedSize,
long versionToExtract)
Creates new compression information for the central directory header.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCompressedSize()
Obtains the compression data size.
|
CompressionMethod |
getMethod()
Obtains the compression method.
|
long |
getVersionExtract()
Obtains the minimum version for extract.
|
public static final long VERSION_WITH_STORE_FILES_ONLY
public static final long VERSION_WITH_DIRECTORIES_AND_DEFLATE
public CentralDirectoryHeaderCompressInfo(@Nonnull
CompressionMethod method,
long compressedSize,
long versionToExtract)
method - the compression methodcompressedSize - the compressed sizeversionToExtract - minimum version to extract (typically
VERSION_WITH_STORE_FILES_ONLY or VERSION_WITH_DIRECTORIES_AND_DEFLATE)public CentralDirectoryHeaderCompressInfo(@Nonnull
CentralDirectoryHeader header,
@Nonnull
CompressionMethod method,
long compressedSize)
header - the header this information relates tomethod - the compression methodcompressedSize - the compressed sizepublic long getCompressedSize()
@Nonnull public CompressionMethod getMethod()
public long getVersionExtract()