How can I get:
java.util.zip.ZipException ZIP_Read: error reading zip file?
I've tried with different corrupted zips, corrupted jars, but no luck so far. Any idea?
How can I get:
java.util.zip.ZipException ZIP_Read: error reading zip file?
I've tried with different corrupted zips, corrupted jars, but no luck so far. Any idea?
private void play() {
try {
ZipFile zipFile = new ZipFile("./data/demo.zip");
ZipArchiveEntry zipArchiveEntry;
Enumeration<ZipArchiveEntry> entries = zipFile.getEntries();
while (entries.hasMoreElements()) {
zipArchiveEntry = entries.nextElement();
long size = zipArchiveEntry.getSize();
// more code
}
} catch(Exception e) {
e.printStackTrace();
}
}