public class CentralDirectoryFileHeader extends Object
central file header signature 4 bytes (0x02014b50) version made by 2 bytes version needed to extract 2 bytes general purpose bit flag 2 bytes compression method 2 bytes last mod file time 2 bytes last mod file date 2 bytes crc-32 4 bytes compressed size 4 bytes uncompressed size 4 bytes file name length 2 bytes extra field length 2 bytes file comment length 2 bytes disk number start 2 bytes internal file attributes 2 bytes external file attributes 4 bytes relative offset of local header 4 bytes file name (variable size) extra field (variable size) file comment (variable size)
| Modifier and Type | Field and Description |
|---|---|
long |
compressedSize |
int |
compressionMethod |
int |
crc32 |
int |
diskNumberStart |
int |
externalFileAttributes |
Map<Integer,net.jsign.zip.ExtraField> |
extraFields |
byte[] |
fileComment |
byte[] |
fileName |
int |
generalPurposeBitFlag |
int |
internalFileAttributes |
int |
lastModFileDate |
int |
lastModFileTime |
long |
localHeaderOffset |
static int |
SIGNATURE |
long |
uncompressedSize |
int |
versionMadeBy |
int |
versionNeededToExtract |
| Constructor and Description |
|---|
CentralDirectoryFileHeader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCompressedSize() |
long |
getLocalHeaderOffset() |
long |
getUncompressedSize() |
void |
read(ReadableByteChannel channel) |
void |
setLocalHeaderOffset(long offset) |
ByteBuffer |
toBuffer() |
void |
write(OutputStream out) |
void |
write(WritableByteChannel channel) |
public long compressedSize
public int compressionMethod
public int crc32
public int diskNumberStart
public int externalFileAttributes
public Map<Integer,net.jsign.zip.ExtraField> extraFields
public byte[] fileComment
public byte[] fileName
public int generalPurposeBitFlag
public int internalFileAttributes
public int lastModFileDate
public int lastModFileTime
public long localHeaderOffset
public static final int SIGNATURE
public long uncompressedSize
public int versionMadeBy
public int versionNeededToExtract
public CentralDirectoryFileHeader()
public long getCompressedSize()
public long getLocalHeaderOffset()
public long getUncompressedSize()
public void read(ReadableByteChannel channel) throws IOException
IOExceptionpublic void setLocalHeaderOffset(long offset)
public ByteBuffer toBuffer()
public void write(OutputStream out) throws IOException
IOExceptionpublic void write(WritableByteChannel channel) throws IOException
IOExceptionCopyright © 2012–2025. All rights reserved.