Modifier and Type | Field and Description |
---|---|
pack-priv FileTime | |
pack-priv String | |
pack-priv long | |
pack-priv long | |
pack-priv boolean | |
pack-priv FileTime | |
public static final int | DEFLATED
Compression method for compressed (deflated) entries. |
pack-priv static final long | DOSTIME_BEFORE_1980
DOS time constant for representing timestamps before 1980. |
pack-priv byte[] | |
pack-priv int | |
pack-priv int | |
pack-priv int | |
pack-priv FileTime | |
pack-priv String | |
pack-priv long | |
public static final int | STORED
Compression method for uncompressed entries. |
private static final long | UPPER_DOSTIME_BOUND
Approximately 128 years, in milliseconds (ignoring leap years etc). |
pack-priv long |
Access | Constructor and Description |
---|---|
public | |
public |
Modifier and Type | Method and Description |
---|---|
public Object | |
public String | Returns: the comment string for the entry, or null if noneReturns the comment string for the entry. |
public long | Returns: the size of the compressed entry data, or -1 if not knownReturns the size of the compressed entry data. |
public long | Returns: the CRC-32 checksum of the uncompressed entry data, or -1 if not knownReturns the CRC-32 checksum of the uncompressed entry data. |
public FileTime | Returns: the creation time of the entry, null if not specifiedReturns the creation time of the entry. |
public byte[] | Returns: the extra field data for the entry, or null if noneReturns the extra field data for the entry. |
public FileTime | Returns: The last access time of the entry, null if not specifiedReturns the last access time of the entry. |
public FileTime | Returns: The last modification time of the entry, null if not specifiedReturns the last modification time of the entry. |
public int | Returns: the compression method of the entry, or -1 if not specifiedReturns the compression method of the entry. |
public String | |
public long | Returns: the uncompressed size of the entry data, or -1 if not knownReturns the uncompressed size of the entry data. |
public long | Returns: The last modification time of the entry in milliseconds since the epoch, or -1 if not specifiedReturns the last modification time of the entry. |
public LocalDateTime | Returns: The last modification time of the entry in local date-timeReturns the last modification time of the entry in local date-time. |
public int | |
public boolean | |
public void | |
public void | |
public void | |
public ZipEntry | Returns: This ZIP entryThe creation time of the entry time)Sets the creation time of the entry. |
public void | |
pack-priv void | setExtra0(byte[]
the extra field data bytes extra, boolean if true, set size and csize from ZIP64 fields if present doZIP64, boolean true if setting the extra field for a LOC, false if for
a CEN isLOC)Sets the optional extra field data for the entry. |
public ZipEntry | Returns: This ZIP entryThe last access time of the entry time)Sets the last access time of the entry. |
public ZipEntry | Returns: This ZIP entryThe last modification time of the entry time)Sets the last modification time of the entry. |
public void | setMethod(int
the compression method, either STORED or DEFLATED method)Sets the compression method for the entry. |
public void | |
public void | setTime(long
The last modification time of the entry in milliseconds
since the epoch time)Sets the last modification time of the entry. |
public void | setTimeLocal(LocalDateTime
The last modification time of the entry in local date-time time)Sets the last modification time of the entry in local date-time. |
public String |
atime | back to summary |
---|---|
pack-priv FileTime atime |
comment | back to summary |
---|---|
pack-priv String comment |
crc | back to summary |
---|---|
pack-priv long crc |
csize | back to summary |
---|---|
pack-priv long csize |
csizeSet | back to summary |
---|---|
pack-priv boolean csizeSet |
ctime | back to summary |
---|---|
pack-priv FileTime ctime |
DEFLATED | back to summary |
---|---|
public static final int DEFLATED Compression method for compressed (deflated) entries. |
DOSTIME_BEFORE_1980 | back to summary |
---|---|
pack-priv static final long DOSTIME_BEFORE_1980 DOS time constant for representing timestamps before 1980. |
extra | back to summary |
---|---|
pack-priv byte[] extra |
extraAttributes | back to summary |
---|---|
pack-priv int extraAttributes |
flag | back to summary |
---|---|
pack-priv int flag |
method | back to summary |
---|---|
pack-priv int method |
mtime | back to summary |
---|---|
pack-priv FileTime mtime |
name | back to summary |
---|---|
pack-priv String name |
size | back to summary |
---|---|
pack-priv long size |
STORED | back to summary |
---|---|
public static final int STORED Compression method for uncompressed entries. |
UPPER_DOSTIME_BOUND | back to summary |
---|---|
private static final long UPPER_DOSTIME_BOUND Approximately 128 years, in milliseconds (ignoring leap years etc). This establish an approximate high-bound value for DOS times in milliseconds since epoch, used to enable an efficient but sufficient bounds check to avoid generating extended last modified time entries. Calculating the exact number is locale dependent, would require loading TimeZone data eagerly, and would make little practical sense. Since DOS times theoretically go to 2107 - with compatibility not guaranteed after 2099 - setting this to a time that is before but near 2099 should be sufficient. |
xdostime | back to summary |
---|---|
pack-priv long xdostime |
ZipEntry | back to summary |
---|---|
public ZipEntry(String name) Creates a new ZIP entry with the specified name.
|
ZipEntry | back to summary |
---|---|
public ZipEntry(ZipEntry e) Creates a new ZIP entry with fields taken from the specified ZIP entry.
|
clone | back to summary |
---|---|
public Object clone() Overrides java. Returns a copy of this entry.
|
getComment | back to summary |
---|---|
public String getComment() Returns the comment string for the entry.
|
getCompressedSize | back to summary |
---|---|
public long getCompressedSize() Returns the size of the compressed entry data. In the case of a stored entry, the compressed size will be the same as the uncompressed size of the entry.
|
getCrc | back to summary |
---|---|
public long getCrc() Returns the CRC-32 checksum of the uncompressed entry data.
|
getCreationTime | back to summary |
---|---|
public FileTime getCreationTime() Returns the creation time of the entry. The creation time is from the extended timestamp fields of
entry's
|
getExtra | back to summary |
---|---|
public byte[] getExtra() Returns the extra field data for the entry.
|
getLastAccessTime | back to summary |
---|---|
public FileTime getLastAccessTime() Returns the last access time of the entry. The last access time is from the extended timestamp fields
of entry's
|
getLastModifiedTime | back to summary |
---|---|
public FileTime getLastModifiedTime() Returns the last modification time of the entry. If the entry is read from a ZIP file or ZIP file formatted
input stream, this is the last modification time from the zip
file entry's
|
getMethod | back to summary |
---|---|
public int getMethod() Returns the compression method of the entry.
|
getName | back to summary |
---|---|
public String getName() Returns the name of the entry.
|
getSize | back to summary |
---|---|
public long getSize() Returns the uncompressed size of the entry data.
|
getTime | back to summary |
---|---|
public long getTime() Returns the last modification time of the entry. If the entry is read from a ZIP file or ZIP file formatted
input stream, this is the last modification time from the
|
getTimeLocal | back to summary |
---|---|
public LocalDateTime getTimeLocal() Returns the last modification time of the entry in local date-time. If the entry is read from a ZIP file or ZIP file formatted
input stream, this is the last modification time from the zip
file entry's The
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns the hash code value for this entry.
|
isDirectory | back to summary |
---|---|
public boolean isDirectory() Returns true if this is a directory entry. A directory entry is defined to be one whose name ends with a '/'.
|
setComment | back to summary |
---|---|
public void setComment(String comment) Sets the optional comment string for the entry. ZIP entry comments have maximum length of 0xffff. If the length of the specified comment string is greater than 0xFFFF bytes after encoding, only the first 0xFFFF bytes are output to the ZIP file entry.
|
setCompressedSize | back to summary |
---|---|
public void setCompressedSize(long csize) Sets the size of the compressed entry data.
|
setCrc | back to summary |
---|---|
public void setCrc(long crc) Sets the CRC-32 checksum of the uncompressed entry data.
|
setCreationTime | back to summary |
---|---|
public ZipEntry setCreationTime(FileTime time) Sets the creation time of the entry. If set, the creation time will be stored into the extended
timestamp fields of entry's
|
setExtra | back to summary |
---|---|
public void setExtra(byte[] extra) Sets the optional extra field data for the entry. Invoking this method may change this entry's last modification
time, last access time and creation time, if the
|
setExtra0 | back to summary |
---|---|
pack-priv void setExtra0(byte[] extra, boolean doZIP64, boolean isLOC) Sets the optional extra field data for the entry.
|
setLastAccessTime | back to summary |
---|---|
public ZipEntry setLastAccessTime(FileTime time) Sets the last access time of the entry. If set, the last access time will be stored into the extended
timestamp fields of entry's
|
setLastModifiedTime | back to summary |
---|---|
public ZipEntry setLastModifiedTime(FileTime time) Sets the last modification time of the entry. When output to a ZIP file or ZIP file formatted output stream
the last modification time set by this method will be stored into
ZIP file entry's
|
setMethod | back to summary |
---|---|
public void setMethod(int method) Sets the compression method for the entry.
|
setSize | back to summary |
---|---|
public void setSize(long size) Sets the uncompressed size of the entry data.
|
setTime | back to summary |
---|---|
public void setTime(long time) Sets the last modification time of the entry. If the entry is output to a ZIP file or ZIP file formatted
output stream the last modification time set by this method will
be stored into the
|
setTimeLocal | back to summary |
---|---|
public void setTimeLocal(LocalDateTime time) Sets the last modification time of the entry in local date-time. If the entry is output to a ZIP file or ZIP file formatted
output stream the last modification time set by this method will
be stored into the
|
toString | back to summary |
---|---|
public String toString() Overrides java. Returns a string representation of the ZIP entry.
|