Module java.base

Class ZipFile

All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:

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.