java.lang.Object | |
↳ | java.util.zip.ZipEntry |
Known Direct Subclasses |
An instance of ZipEntry
represents an entry within a ZIP-archive.
An entry has attributes such as name (= path) or the size of its data. While
an entry identifies data stored in an archive, it does not hold the data
itself. For example when reading a ZIP-file you will first retrieve
all its entries in a collection and then read the data for a specific entry
through an input stream.
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 | Zip entry state: Deflated. | |||||||||
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 | Zip entry state: Stored. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
ZipEntry with the specified name. | |||||||||||
Constructs a new
ZipEntry using the values obtained from ze . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a deep copy of this zip entry.
| |||||||||||
Gets the comment for this
ZipEntry . | |||||||||||
Gets the compressed size of this
ZipEntry . | |||||||||||
Gets the checksum for this
ZipEntry . | |||||||||||
Gets the extra information for this
ZipEntry . | |||||||||||
Gets the compression method for this
ZipEntry . | |||||||||||
Gets the name of this
ZipEntry . | |||||||||||
Gets the uncompressed size of this
ZipEntry . | |||||||||||
Gets the last modification time of this
ZipEntry . | |||||||||||
Returns the hash code for this
ZipEntry . | |||||||||||
Determine whether or not this
ZipEntry is a directory. | |||||||||||
Sets the comment for this
ZipEntry . | |||||||||||
Sets the compressed size for this
ZipEntry . | |||||||||||
Sets the checksum for this
ZipEntry . | |||||||||||
Sets the extra information for this
ZipEntry . | |||||||||||
Sets the compression method for this
ZipEntry . | |||||||||||
Sets the uncompressed size of this
ZipEntry . | |||||||||||
Sets the modification time of this
ZipEntry . | |||||||||||
Returns the string representation of this
ZipEntry . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Zip entry state: Deflated.
Zip entry state: Stored.
Constructs a new ZipEntry
with the specified name.
name | the name of the ZIP entry. |
---|
IllegalArgumentException | if the name length is outside the range (> 0xFFFF). |
---|
Constructs a new ZipEntry
using the values obtained from ze
.
ze | the ZipEntry from which to obtain values.
|
---|
Returns a deep copy of this zip entry.
Gets the comment for this ZipEntry
.
ZipEntry
, or null
if there
is no comment. If we're reading an archive with
ZipInputStream
the comment is not available.
Gets the compressed size of this ZipEntry
.
Gets the checksum for this ZipEntry
.
Gets the extra information for this ZipEntry
.
null
if
there is none.
Gets the compression method for this ZipEntry
.
DEFLATED
, STORED
or -1 if the compression method has not been set.
Gets the uncompressed size of this ZipEntry
.
-1
if the size has not been
set.
Gets the last modification time of this ZipEntry
.
Returns the hash code for this ZipEntry
.
Determine whether or not this ZipEntry
is a directory.
true
when this ZipEntry
is a directory, false
otherwise.
Sets the comment for this ZipEntry
.
comment | the comment for this entry. |
---|
Sets the compressed size for this ZipEntry
.
value | the compressed size (in bytes). |
---|
Sets the checksum for this ZipEntry
.
value | the checksum for this entry. |
---|
IllegalArgumentException | if value is < 0 or > 0xFFFFFFFFL.
|
---|
Sets the extra information for this ZipEntry
.
data | a byte array containing the extra information. |
---|
IllegalArgumentException | when the length of data is greater than 0xFFFF bytes. |
---|
Sets the compression method for this ZipEntry
.
value | the compression method, either DEFLATED or STORED . |
---|
IllegalArgumentException | when value is not DEFLATED or STORED .
|
---|
Sets the uncompressed size of this ZipEntry
.
value | the uncompressed size for this entry. |
---|
IllegalArgumentException | if value < 0 or value > 0xFFFFFFFFL.
|
---|
Sets the modification time of this ZipEntry
.
value | the modification time as the number of milliseconds since Jan. 1, 1970. |
---|
Returns the string representation of this ZipEntry
.
ZipEntry
.