This is a simple code to Read a zip file ........
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class Main {
public static void main(String[] args) throws Exception {
FileInputStream fis = new FileInputStream("C:/MyZip.zip");
ZipInputStream zis = new ZipInputStream(fis);
ZipEntry ze;
while ((ze = zis.getNextEntry()) != null) {
System.out.println(ze.getName());
zis.closeEntry();
}
zis.close();
}
}
0 comments:
Post a Comment