In this tutorial, We will discuss how to show all the entries of a zip file. The ZipFile
class is used to read entries of zip files. The entries() methods of ZipFile class
returns enumeration of zip file entries. The getName() method of ZipFile class
class returns name of available entry. The hasMoreElements() of Enumeration
class check the availability of more entries in zip file, and nextElement()
method returns next element of entry .
About ZipFile API:
The java.util.zip.ZipFile class extends java.io.FilterIntputStream class.
provides the following methods:
|enumeration||entries()||The entries() method returns enumeration of entries of zip file.|
|String||getName()||The getName() method returns the name of zip file entries.|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.