Java Zip Package
In Java, the java.util.zip package provides classes for reading and
writing the standard and compressed files or archives in the ZIP and GZIP file
formats. Basically, ZIP file forms for the JAR file format, so it is easier to
include classes for manipulating ZIP files as part of the standard Java APIs.
This functionality is very useful, because it saves the time of creating custom
file archive formats for your applications. You can use the ZipFile class
to read entries in a ZIP file. A ZipFile object can be created with a File
object or a String representing the filename and relevant path.
Here the class summary defined in the java.util.zip package is shown
in the table:
Class |
Description |
GZIPInputStream |
This class implements a stream filter for reading
compressed data in the GZIP format. |
GZIPOutputStream |
This class implements a stream filter for writing
compressed data in the GZIP file format. |
ZipEntry |
This class is used to represent a ZIP file entry. |
ZipFile |
This class is used to read entries from a zip file. |
ZipInputStream |
This class implements an input stream filter for
reading files in the ZIP file format. |
ZipOutputStream |
This class implements an output stream filter for
writing files in the ZIP file format. |