| |
|
| java.lang.Object java.util.zip.ZipEntry
All known Subclasses: java.util.jar.JarEntry,
ZipEntry | public class ZipEntry implements ZipConstants,Cloneable(Code) | | This class is used to represent a ZIP file entry.
version: 1.46, 05/05/07 author: David Connelly |
Method Summary | |
public Object | clone() Returns a copy of this entry. | public String | getComment() Returns the comment string for the entry, or null if none. | public long | getCompressedSize() Returns the size of the compressed entry data, or -1 if not known. | public long | getCrc() Returns the CRC-32 checksum of the uncompressed entry data, or -1 if
not known. | public byte[] | getExtra() Returns the extra field data for the entry, or null if none. | public int | getMethod() Returns the compression method of the entry, or -1 if not specified. | public String | getName() Returns the name of the entry. | public long | getSize() Returns the uncompressed size of the entry data, or -1 if not known. | public long | getTime() Returns the modification time of the entry, or -1 if not specified. | public int | hashCode() Returns the hash code value for this entry. | public boolean | isDirectory() Returns true if this is a directory entry. | public void | setComment(String comment) Sets the optional comment string for the entry. | public void | setCompressedSize(long csize) Sets the size of the compressed entry data. | public void | setCrc(long crc) Sets the CRC-32 checksum of the uncompressed entry data. | public void | setExtra(byte[] extra) Sets the optional extra field data for the entry. | public void | setMethod(int method) Sets the compression method for the entry. | public void | setSize(long size) Sets the uncompressed size of the entry data. | public void | setTime(long time) Sets the modification time of the entry. | public String | toString() Returns a string representation of the ZIP entry. |
DEFLATED | final public static int DEFLATED(Code) | | Compression method for compressed (deflated) entries.
|
STORED | final public static int STORED(Code) | | Compression method for uncompressed entries.
|
ZipEntry | public ZipEntry(ZipEntry e)(Code) | | Creates a new zip entry with fields taken from the specified
zip entry.
Parameters: e - a zip Entry object |
ZipEntry | ZipEntry(long jzentry)(Code) | | |
clone | public Object clone()(Code) | | Returns a copy of this entry.
|
getCompressedSize | public long getCompressedSize()(Code) | | 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.
the size of the compressed entry data, or -1 if not known See Also: ZipEntry.setCompressedSize(long) |
getCrc | public long getCrc()(Code) | | Returns the CRC-32 checksum of the uncompressed entry data, or -1 if
not known.
the CRC-32 checksum of the uncompressed entry data, or -1 ifnot known See Also: ZipEntry.setCrc(long) |
getExtra | public byte[] getExtra()(Code) | | Returns the extra field data for the entry, or null if none.
the extra field data for the entry, or null if none See Also: ZipEntry.setExtra(byte[]) |
getMethod | public int getMethod()(Code) | | Returns the compression method of the entry, or -1 if not specified.
the compression method of the entry, or -1 if not specified See Also: ZipEntry.setMethod(int) |
getName | public String getName()(Code) | | Returns the name of the entry.
the name of the entry |
getSize | public long getSize()(Code) | | Returns the uncompressed size of the entry data, or -1 if not known.
the uncompressed size of the entry data, or -1 if not known See Also: ZipEntry.setSize(long) |
getTime | public long getTime()(Code) | | Returns the modification time of the entry, or -1 if not specified.
the modification time of the entry, or -1 if not specified See Also: ZipEntry.setTime(long) |
hashCode | public int hashCode()(Code) | | Returns the hash code value for this entry.
|
isDirectory | public boolean isDirectory()(Code) | | Returns true if this is a directory entry. A directory entry is
defined to be one whose name ends with a '/'.
true if this is a directory entry |
setComment | public void setComment(String comment)(Code) | | Sets the optional comment string for the entry.
Parameters: comment - the comment string exception: IllegalArgumentException - if the length of the specifiedcomment string is greater than 0xFFFF bytes See Also: ZipEntry.getComment() |
setCompressedSize | public void setCompressedSize(long csize)(Code) | | Sets the size of the compressed entry data.
Parameters: csize - the compressed size to set to See Also: ZipEntry.getCompressedSize() |
setCrc | public void setCrc(long crc)(Code) | | Sets the CRC-32 checksum of the uncompressed entry data.
Parameters: crc - the CRC-32 value exception: IllegalArgumentException - if the specified CRC-32 value isless than 0 or greater than 0xFFFFFFFF See Also: ZipEntry.getCrc() |
setExtra | public void setExtra(byte[] extra)(Code) | | Sets the optional extra field data for the entry.
Parameters: extra - the extra field data bytes exception: IllegalArgumentException - if the length of the specifiedextra field data is greater than 0xFFFF bytes See Also: ZipEntry.getExtra() |
setMethod | public void setMethod(int method)(Code) | | Sets the compression method for the entry.
Parameters: method - the compression method, either STORED or DEFLATED exception: IllegalArgumentException - if the specified compressionmethod is invalid See Also: ZipEntry.getMethod() |
setSize | public void setSize(long size)(Code) | | Sets the uncompressed size of the entry data.
Parameters: size - the uncompressed size in bytes exception: IllegalArgumentException - if the specified size is lessthan 0 or greater than 0xFFFFFFFF bytes See Also: ZipEntry.getSize() |
setTime | public void setTime(long time)(Code) | | Sets the modification time of the entry.
Parameters: time - the entry modification time in number of millisecondssince the epoch See Also: ZipEntry.getTime() |
toString | public String toString()(Code) | | Returns a string representation of the ZIP entry.
|
|
|
|