public final class CentralDirectoryFileHeader extends Object
| 构造器和说明 |
|---|
CentralDirectoryFileHeader() |
CentralDirectoryFileHeader(byte[] header,
int headerOffset,
AsciiBytes name,
byte[] extra,
AsciiBytes comment,
long localHeaderOffset) |
| 限定符和类型 | 方法和说明 |
|---|---|
CentralDirectoryFileHeader |
clone() |
static CentralDirectoryFileHeader |
fromRandomAccessData(RandomAccessData data,
int offset,
JarEntryFilter filter) |
AsciiBytes |
getComment() |
long |
getCompressedSize()
Return the compressed size of the entry.
|
long |
getCrc() |
byte[] |
getExtra() |
long |
getLocalHeaderOffset()
Return the offset of the load file header within the archive data.
|
int |
getMethod()
Return the method used to compress the data.
|
AsciiBytes |
getName() |
long |
getSize()
Return the uncompressed size of the entry.
|
long |
getTime() |
boolean |
hasName(String name,
String suffix)
Returns
true if the header has the given name. |
boolean |
isDirectory() |
void |
load(byte[] data,
int dataOffset,
RandomAccessData variableData,
int variableOffset,
JarEntryFilter filter) |
public CentralDirectoryFileHeader()
public CentralDirectoryFileHeader(byte[] header,
int headerOffset,
AsciiBytes name,
byte[] extra,
AsciiBytes comment,
long localHeaderOffset)
public void load(byte[] data,
int dataOffset,
RandomAccessData variableData,
int variableOffset,
JarEntryFilter filter)
throws IOException
IOExceptionpublic AsciiBytes getName()
public boolean hasName(String name, String suffix)
true if the header has the given name.name - the name to testsuffix - an additional suffix (or null)true if the header has the given namepublic boolean isDirectory()
public int getMethod()
ZipEntry.STORED,
ZipEntry.DEFLATEDpublic long getTime()
public long getCrc()
public long getCompressedSize()
public long getSize()
public byte[] getExtra()
public AsciiBytes getComment()
public long getLocalHeaderOffset()
public CentralDirectoryFileHeader clone()
public static CentralDirectoryFileHeader fromRandomAccessData(RandomAccessData data, int offset, JarEntryFilter filter) throws IOException
IOExceptionCopyright © 2019. All rights reserved.