Java ZipFile.size()
Syntax
ZipFile.size() has the following syntax.
public int size()
Example
In the following code shows how to use ZipFile.size() method.
import java.io.File;
import java.util.zip.ZipFile;
//from w w w. j av a 2 s .c o m
public class Main {
public static void main(String[] args) throws Exception {
ZipFile zipFile = new ZipFile(new File("testfile.zip"),ZipFile.OPEN_READ);
System.out.println(zipFile.size());
}
}