java.util.zip
public class ZipEntry extends Object implements ZipConstants, Cloneable
Field Summary | |
---|---|
static int | DEFLATED
Compression method. |
static int | STORED
Compression method. |
Constructor Summary | |
---|---|
ZipEntry(String name)
Creates a zip entry with the given name. | |
ZipEntry(ZipEntry e)
Creates a copy of the given zip entry. |
Method Summary | |
---|---|
Object | clone()
Clones the entry. |
String | getComment()
Gets the comment. |
long | getCompressedSize()
Gets the size of the compressed data. |
long | getCrc()
Gets the crc of the uncompressed data. |
byte[] | getExtra()
Gets the extra data. |
int | getMethod()
Gets the compression method. |
String | getName()
Returns the entry name. |
long | getSize()
Gets the size of the uncompressed data. |
long | getTime()
Gets the time of last modification of the entry. |
int | hashCode()
Gets the hashCode of this ZipEntry. |
boolean | isDirectory()
Gets true, if the entry is a directory. |
void | setComment(String comment)
Sets the entry comment. |
void | setCompressedSize(long csize)
Sets the size of the compressed data. |
void | setCrc(long crc)
Sets the crc of the uncompressed data. |
void | setExtra(byte[] extra)
Sets the extra data. |
void | setMethod(int method)
Sets the compression method. |
void | setSize(long size)
Sets the size of the uncompressed data. |
void | setTime(long time)
Sets the time of last modification of the entry. |
String | toString()
Gets the string representation of this ZipEntry. |
Parameters: name the name. May include directory components separated by '/'.
Throws: NullPointerException when name is null. IllegalArgumentException when name is bigger then 65535 chars.
Parameters: e the entry to copy.
Returns: the comment or null if not set.
Returns: the size or -1 if unknown.
Returns: the crc or -1 if unknown.
Returns: the extra data or null if not set.
Returns: the compression method or -1 if unknown.
Returns: the size or -1 if unknown.
Returns: the time of last modification of the entry, or -1 if unknown.
Throws: IllegalArgumentException if comment is longer than 0xffff.
Throws: IllegalArgumentException if crc is not in 0..0xffffffffL
Throws: IllegalArgumentException if extra is longer than 0xffff bytes.
Throws: IllegalArgumentException if method is not supported.
Throws: IllegalArgumentException if size is not in 0..0xffffffffL
UNKNOWN: the time of last modification of the entry.