Module java.base
Package java.util.zip

Class ZipFile

java.lang.Object
java.util.zip.ZipFile
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
JarFile

public class ZipFile
extends Object
implements Closeable
This class is used to read entries from a zip file.

Unless otherwise noted, passing a null argument to a constructor or method in this class will cause a NullPointerException to be thrown.

API Note:
To release resources used by this ZipFile, the close() method should be called explicitly or by try-with-resources. Subclasses are responsible for the cleanup of resources acquired by the subclass. Subclasses that override Object.finalize() in order to perform cleanup should be modified to use alternative cleanup mechanisms such as Cleaner and remove the overriding finalize method.
Since:
1.1