📅  最后修改于: 2020-11-14 10:54:24             🧑  作者: Mango
java.util.zip.ZipEntry类用于表示一个ZIP文件条目。
以下是java.util.zip.ZipEntry类的声明-
public class ZipEntry
extends Object
implements Cloneable
以下是java.util.zip.ZipEntry类的字段-
protected byte [] buf-用于写入未压缩数据的输出缓冲区。
protected Inflater inf-此流的解压缩器。
静态int CENATT
静态int CENATX
静态int CENCOM
静态int CENCRC
static int CENDSK
静态int CENEXT
静态int CENFLG
静态int CENHDR
静态int CENHOW
静态整数CENLEN
静态int CENNAM
静态int CENOFF
静态长CENSIG
静态int CENSIZ
静态int CENTIM
static int CENVEM
static int CENVER
static int DEFLATED-压缩(压缩)条目的压缩方法。
静态int ENDCOM
静态int ENDHDR
静态int ENDOFF
静态长ENDSIG
静态整数ENDSIZ
静态int ENDSUB
静态int ENDTOT
静态int EXTCRC
静态诠释EXTHDR
静态整数EXTLEN
静态长EXTSIG
静态整数EXTSIZ
静态int LOCCRC
静态整数LOCEXT
静态int LOCFLG
静态int LOCHDR
静态int LOCHOW
静态整数LOCLEN
静态int LOCNAM
静态长LOCSIG
静态int LOCSIZ
静态整数LOCTIM
静态整数LOCVER
static int STORED-未压缩条目的压缩方法。
Sr.No. | Constructor & Description |
---|---|
1 |
ZipEntry(String name) Creates a new zip entry with the specified name. |
2 |
ZipEntry(ZipEntry e) Creates a new zip entry with fields taken from the specified zip entry. |
Sr.No. | Method & Description |
---|---|
1 | Object clone()
Returns a copy of this entry. |
2 | String getComment()
Returns the comment string for the entry, or null if none. |
3 | long getCompressedSize()
Returns the size of the compressed entry data, or -1 if not known. |
4 | long getCrc()
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known. |
5 | byte[] getExtra()
Returns the extra field data for the entry, or null if none. |
6 | int getMethod()
Returns the compression method of the entry, or -1 if not specified. |
7 | String getName()
Returns the name of the entry. |
8 | long getSize()
Returns the uncompressed size of the entry data, or -1 if not known. |
9 | long getTime()
Returns the modification time of the entry, or -1 if not specified. |
10 | int hashCode()
Returns the hash code value for this entry. |
11 | boolean isDirectory()
Returns true if this is a directory entry. |
12 | void setComment(String comment)
Sets the optional comment string for the entry. |
13 | void setCrc(long crc)
Sets the CRC-32 checksum of the uncompressed entry data. |
14 | void setExtra(byte[] extra)
Sets the optional extra field data for the entry. |
15 | void setMethod(int method)
Sets the compression method for the entry. |
16 | void setSize(long size)
Sets the uncompressed size of the entry data. |
17 | void setTime(long time)
Sets the modification time of the entry. |
18 | String toString()
Returns a string representation of the ZIP entry. |
此类从以下类继承方法-