| Method from java.util.zip.ZipEntry Detail: |
public Object clone() {
try {
ZipEntry e = (ZipEntry)super.clone();
e.extra = (extra == null) ? null : extra.clone();
return e;
} catch (CloneNotSupportedException e) {
// This should never happen, since we are Cloneable
throw new InternalError();
}
}
Returns a copy of this entry. |
public String getComment() {
return comment;
}
Returns the comment string for the entry, or null if none. |
public long getCompressedSize() {
return csize;
}
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. |
public long getCrc() {
return crc;
}
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if
not known. |
public byte[] getExtra() {
return extra;
}
Returns the extra field data for the entry, or null if none. |
public int getMethod() {
return method;
}
Returns the compression method of the entry, or -1 if not specified. |
public String getName() {
return name;
}
Returns the name of the entry. |
public long getSize() {
return size;
}
Returns the uncompressed size of the entry data, or -1 if not known. |
public long getTime() {
return time != -1 ? dosToJavaTime(time) : -1;
}
Returns the modification time of the entry, or -1 if not specified. |
public int hashCode() {
return name.hashCode();
}
Returns the hash code value for this entry. |
public boolean isDirectory() {
return name.endsWith("/");
}
Returns true if this is a directory entry. A directory entry is
defined to be one whose name ends with a '/'. |
public void setComment(String comment) {
this.comment = 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. |
public void setCompressedSize(long csize) {
this.csize = csize;
}
Sets the size of the compressed entry data. |
public void setCrc(long crc) {
if (crc < 0 || crc > 0xFFFFFFFFL) {
throw new IllegalArgumentException("invalid entry crc-32");
}
this.crc = crc;
}
Sets the CRC-32 checksum of the uncompressed entry data. |
public void setExtra(byte[] extra) {
if (extra != null && extra.length > 0xFFFF) {
throw new IllegalArgumentException("invalid extra field length");
}
this.extra = extra;
}
Sets the optional extra field data for the entry. |
public void setMethod(int method) {
if (method != STORED && method != DEFLATED) {
throw new IllegalArgumentException("invalid compression method");
}
this.method = method;
}
Sets the compression method for the entry. |
public void setSize(long size) {
if (size < 0) {
throw new IllegalArgumentException("invalid entry size");
}
this.size = size;
}
Sets the uncompressed size of the entry data. |
public void setTime(long time) {
this.time = javaToDosTime(time);
}
Sets the modification time of the entry. |
public String toString() {
return getName();
}
Returns a string representation of the ZIP entry. |