- java.util.zip - ZipOutputStream
- java.util.zip - ZipInputStream
- java.util.zip - ZipFile
- java.util.zip - ZipEntry
- java.util.zip - InflaterOutputStream
- java.util.zip - InflaterInputStream
- java.util.zip - Inflater
- java.util.zip - GZIPOutputStream
- java.util.zip - GZIPInputStream
- java.util.zip - DeflaterOutputStream
- java.util.zip - DeflaterInputStream
- java.util.zip - Deflater
- java.util.zip - CRC32
- java.util.zip - CheckedOutputStream
- java.util.zip - CheckedInputStream
- java.util.zip - Adler32
- java.util.zip - Home
java.util.zip Package Extras
- java.util.zip - Discussion
- java.util.zip - Useful Resources
- java.util.zip - Quick Guide
- java.util.zip - Error
- java.util.zip - Exceptions
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
java.util.zip - ZipEntry Class
Introduction
The java.util.zip.ZipEntry class is used to represent a ZIP file entry.
Class declaration
Following is the declaration for java.util.zip.ZipEntry class −
pubpc class ZipEntry extends Object implements Cloneable
Fields
Following are the fields for java.util.zip.ZipEntry class −
protected byte[] buf − Output buffer for writing uncompressed data.
protected Inflater inf − Decompressor for this stream.
static int CENATT
static int CENATX
static int CENCOM
static int CENCRC
static int CENDSK
static int CENEXT
static int CENFLG
static int CENHDR
static int CENHOW
static int CENLEN
static int CENNAM
static int CENOFF
static long CENSIG
static int CENSIZ
static int CENTIM
static int CENVEM
static int CENVER
static int DEFLATED − Compression method for compressed (deflated) entries.
static int ENDCOM
static int ENDHDR
static int ENDOFF
static long ENDSIG
static int ENDSIZ
static int ENDSUB
static int ENDTOT
static int EXTCRC
static int EXTHDR
static int EXTLEN
static long EXTSIG
static int EXTSIZ
static int LOCCRC
static int LOCEXT
static int LOCFLG
static int LOCHDR
static int LOCHOW
static int LOCLEN
static int LOCNAM
static long LOCSIG
static int LOCSIZ
static int LOCTIM
static int LOCVER
static int STORED − Compression method for uncompressed entries.
Constructors
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. |
Class methods
Sr.No. | Method & Description |
---|---|
1 | Returns a copy of this entry. |
2 | Returns the comment string for the entry, or null if none. |
3 | Returns the size of the compressed entry data, or -1 if not known. |
4 | Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known. |
5 | Returns the extra field data for the entry, or null if none. |
6 | Returns the compression method of the entry, or -1 if not specified. |
7 | Returns the name of the entry. |
8 | Returns the uncompressed size of the entry data, or -1 if not known. |
9 | Returns the modification time of the entry, or -1 if not specified. |
10 | Returns the hash code value for this entry. |
11 | Returns true if this is a directory entry. |
12 | Sets the optional comment string for the entry. |
13 | Sets the CRC-32 checksum of the uncompressed entry data. |
14 | Sets the optional extra field data for the entry. |
15 | Sets the compression method for the entry. |
16 | Sets the uncompressed size of the entry data. |
17 | Sets the modification time of the entry. |
18 | Returns a string representation of the ZIP entry. |
Methods inherited
This class inherits methods from the following classes −
java.io.FilterOutputStream
java.lang.Object