Java ZipFile.getEntry(String name)
Syntax
ZipFile.getEntry(String name) has the following syntax.
public ZipEntry getEntry(String name)
Example
In the following code shows how to use ZipFile.getEntry(String name) method.
/*from w w w . j ava 2 s. com*/
import java.io.File;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class Main {
public static void main(String[] args) throws Exception {
ZipFile zipFile = new ZipFile(new File("testfile.zip"),ZipFile.OPEN_READ);
ZipEntry entry = zipFile.getEntry("fileName");
}
}