public class CentralDirectoryHeader
extends java.lang.Object
implements java.lang.Cloneable
Because compression decision is done lazily, some data is stored with futures.
| Modifier and Type | Method and Description |
|---|---|
protected CentralDirectoryHeader |
clone() |
byte[] |
getComment()
Obtains the entry's comment.
|
java.util.concurrent.Future<CentralDirectoryHeaderCompressInfo> |
getCompressionInfo()
Obtains the future with the compression information.
|
CentralDirectoryHeaderCompressInfo |
getCompressionInfoWithWait()
Equivalent to
getCompressionInfo().get() but masking the possible exceptions and
guaranteeing non-null return. |
long |
getCrc32()
Obtains the CRC32 of the data.
|
byte[] |
getEncodedFileName()
Obtains the encoded file name.
|
long |
getExternalAttributes()
Obtains the entry's external attributes.
|
ExtraField |
getExtraField()
Obtains the data in the extra field.
|
com.android.tools.build.apkzlib.zip.GPFlags |
getGpBit()
Obtains the general-purpose bit flag.
|
long |
getInternalAttributes()
Obtains the entry's internal attributes.
|
long |
getLastModDate()
Obtains the last modification date of the entry.
|
long |
getLastModTime()
Obtains the last modification time of the entry.
|
long |
getMadeBy()
Obtains the code of the program that made the zip.
|
java.lang.String |
getName()
Obtains the name of the file.
|
long |
getOffset()
Obtains the offset in the zip file where this entry's data is.
|
long |
getUncompressedSize()
Obtains the size of the uncompressed file.
|
void |
setExtraField(ExtraField extraField)
Sets the data in the extra field.
|
public java.lang.String getName()
public long getUncompressedSize()
public long getCrc32()
public long getMadeBy()
public com.android.tools.build.apkzlib.zip.GPFlags getGpBit()
public long getLastModTime()
MsDosDateTimeUtils.packTime(long))public long getLastModDate()
MsDosDateTimeUtils.packDate(long))public ExtraField getExtraField()
public void setExtraField(ExtraField extraField)
extraField - the data to setpublic byte[] getComment()
public long getInternalAttributes()
public long getExternalAttributes()
public long getOffset()
-1 if the file has no data in the zip and, therefore, data is
stored in memorypublic byte[] getEncodedFileName()
protected CentralDirectoryHeader clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.util.concurrent.Future<CentralDirectoryHeaderCompressInfo> getCompressionInfo()
public CentralDirectoryHeaderCompressInfo getCompressionInfoWithWait() throws java.io.IOException
getCompressionInfo().get() but masking the possible exceptions and
guaranteeing non-null return.java.io.IOException - failed to get the information