import java.io.*; import java.util.zip.*; import java.io.FileInputStream.*; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; class Demo { public static void doEntry(String file) throws IOException { FileInputStream inStream = new FileInputStream(file); ZipInputStream zis = new ZipInputStream(inStream); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { System.out.println("Name of Entry in Given Zip file : " + entry.getName()); System.out.println("Size of Entry in Given Zip file is : " + entry.getCompressedSize()+" byte"); System.out.println("Actual Size of Entry is : " + entry.getSize()+" byte"); } } } public class ZipEntryDemo { public static void main(String[] args) throws IOException { Demo.doEntry(args[0]); } }