ZipEntryNameZipEntrySynopsis
DescriptionThe ZipEntry class represents a single entry in a ZIP file, which is either a compressed file or an uncompressed file. ZipEntry provides methods that set and retrieve various pieces of information about an entry. When you are reading a ZIP file, you use ZipInputStream.getNextEntry() to return the next entry in the file. Then you can retrieve information about that particular entry. You can also read the entries in a ZIP file in a nonsequential order using the ZipFile class. When you are writing a ZIP file, you use ZipOutputStream.putNextEntry() to write an entry, and you must create your own ZipEntry objects. If you are storing compressed (deflated) files, you need only specify a name for the ZipEntry ; the other fields are filled in automatically. If, however, you are placing uncompressed entries, you need to specify the size of each entry and provide a CRC-32 checksum value. Class Summary
public class java.util.zip.ZipEntry extends java.lang.Object { // Constants public static final int DEFLATED; public static final int STORED; // Constructors public ZipEntry(String name); // Instance Methods public String getComment(); public long getCompressedSize(); public long getCrc(); public byte[] getExtra(); public int getMethod(); public String getName(); public long getSize(); public long getTime(); public boolean isDirectory(); public void setComment(String comment); public void setCrc(long crc); public void setExtra(byte[] extra); public void setMethod(int method); public void setSize(long size); public void setTime(long time); public String toString(); } ConstantsDEFLATEDpublic static final int DEFLATED
STOREDpublic static final int STORED
ConstructorsZipEntrypublic ZipEntry(String name)
Instance MethodsgetCommentpublic String getComment()
getCompressedSizepublic long getCompressedSize()
getCrcpublic long getCrc()
getExtrapublic byte[] getExtra()
getMethodpublic int getMethod()
getNamepublic String getName()
getSizepublic long getSize()
getTimepublic long getTime()
isDirectorypublic boolean isDirectory()
setCommentpublic void setComment(String comment)
setCrcpublic void setCrc(long crc)
setExtrapublic void setExtra(byte[] extra)
setMethodpublic void setMethod(int method)
setSizepublic void setSize(long size)
setTimepublic void setTime(long time)
toStringpublic String toString()
Inherited Methods
See AlsoDeflater, IllegalArgumentException, Inflater, NullPointerException, ZipInputStream, ZipOutputStream | ||||||||||||||||||||||||
|