java.lang.Object | |
↳ | java.util.zip.ZipEntry |
Known Direct Subclasses |
This class is used to represent a ZIP file entry.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | CENATT | ||||||||||
int | CENATX | ||||||||||
int | CENCOM | ||||||||||
int | CENCRC | ||||||||||
int | CENDSK | ||||||||||
int | CENEXT | ||||||||||
int | CENFLG | ||||||||||
int | CENHDR | ||||||||||
int | CENHOW | ||||||||||
int | CENLEN | ||||||||||
int | CENNAM | ||||||||||
int | CENOFF | ||||||||||
long | CENSIG | ||||||||||
int | CENSIZ | ||||||||||
int | CENTIM | ||||||||||
int | CENVEM | ||||||||||
int | CENVER | ||||||||||
int | DEFLATED | Compression method for compressed (deflated) entries. | |||||||||
int | ENDCOM | ||||||||||
int | ENDHDR | ||||||||||
int | ENDOFF | ||||||||||
long | ENDSIG | ||||||||||
int | ENDSIZ | ||||||||||
int | ENDSUB | ||||||||||
int | ENDTOT | ||||||||||
int | EXTCRC | ||||||||||
int | EXTHDR | ||||||||||
int | EXTLEN | ||||||||||
long | EXTSIG | ||||||||||
int | EXTSIZ | ||||||||||
int | LOCCRC | ||||||||||
int | LOCEXT | ||||||||||
int | LOCFLG | ||||||||||
int | LOCHDR | ||||||||||
int | LOCHOW | ||||||||||
int | LOCLEN | ||||||||||
int | LOCNAM | ||||||||||
long | LOCSIG | ||||||||||
int | LOCSIZ | ||||||||||
int | LOCTIM | ||||||||||
int | LOCVER | ||||||||||
int | STORED | Compression method for uncompressed entries. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new zip entry with the specified name.
| |||||||||||
Creates a new zip entry with fields taken from the specified
zip entry.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a copy of this entry.
| |||||||||||
Returns the comment string for the entry, or null if none.
| |||||||||||
Returns the size of the compressed entry data, or -1 if not known.
| |||||||||||
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if
not known.
| |||||||||||
Returns the extra field data for the entry, or null if none.
| |||||||||||
Returns the compression method of the entry, or -1 if not specified.
| |||||||||||
Returns the name of the entry.
| |||||||||||
Returns the uncompressed size of the entry data, or -1 if not known.
| |||||||||||
Returns the modification time of the entry, or -1 if not specified.
| |||||||||||
Returns the hash code value for this entry.
| |||||||||||
Returns true if this is a directory entry.
| |||||||||||
Sets the optional comment string for the entry.
| |||||||||||
Sets the size of the compressed entry data.
| |||||||||||
Sets the CRC-32 checksum of the uncompressed entry data.
| |||||||||||
Sets the optional extra field data for the entry.
| |||||||||||
Sets the compression method for the entry.
| |||||||||||
Sets the uncompressed size of the entry data.
| |||||||||||
Sets the modification time of the entry.
| |||||||||||
Returns a string representation of the ZIP entry.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Compression method for compressed (deflated) entries.
Compression method for uncompressed entries.
Creates a new zip entry with the specified name.
name | the entry name |
---|
NullPointerException | if the entry name is null |
---|---|
IllegalArgumentException | if the entry name is longer than 0xFFFF bytes |
Creates a new zip entry with fields taken from the specified zip entry.
e | a zip Entry object |
---|
Returns the comment string for the entry, or null if none.
Returns the size of the compressed entry data, or -1 if not known. In the case of a stored entry, the compressed size will be the same as the uncompressed size of the entry.
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known.
Returns the extra field data for the entry, or null if none.
Returns the compression method of the entry, or -1 if not specified.
Returns the uncompressed size of the entry data, or -1 if not known.
Returns the modification time of the entry, or -1 if not specified.
Returns the hash code value for this entry.
Returns true if this is a directory entry. A directory entry is defined to be one whose name ends with a '/'.
Sets the optional comment string for the entry.
comment | the comment string |
---|
IllegalArgumentException | if the length of the specified comment string is greater than 0xFFFF bytes |
---|
Sets the size of the compressed entry data.
csize | the compressed size to set to |
---|
Sets the CRC-32 checksum of the uncompressed entry data.
crc | the CRC-32 value |
---|
IllegalArgumentException | if the specified CRC-32 value is less than 0 or greater than 0xFFFFFFFF |
---|
Sets the optional extra field data for the entry.
extra | the extra field data bytes |
---|
IllegalArgumentException | if the length of the specified extra field data is greater than 0xFFFF bytes |
---|
Sets the compression method for the entry.
method | the compression method, either STORED or DEFLATED |
---|
IllegalArgumentException | if the specified compression method is invalid |
---|
Sets the uncompressed size of the entry data.
size | the uncompressed size in bytes |
---|
IllegalArgumentException | if the specified size is less than 0 or greater than 0xFFFFFFFF bytes |
---|
Sets the modification time of the entry.
time | the entry modification time in number of milliseconds since the epoch |
---|
Returns a string representation of the ZIP entry.