53 import java.util.stream.Stream;
54 import java.util.stream.StreamSupport;
55 import jdk.internal.misc.JavaUtilZipFileAccess;
56 import jdk.internal.misc.SharedSecrets;
57 import jdk.internal.misc.JavaIORandomAccessFileAccess;
58 import jdk.internal.misc.VM;
59 import jdk.internal.perf.PerfCounter;
60
61 import static java.util.zip.ZipConstants.*;
62 import static java.util.zip.ZipConstants64.*;
63 import static java.util.zip.ZipUtils.*;
64
65 /**
66 * This class is used to read entries from a zip file.
67 *
68 * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
69 * or method in this class will cause a {@link NullPointerException} to be
70 * thrown.
71 *
72 * @author David Connelly
73 */
74 public
75 class ZipFile implements ZipConstants, Closeable {
76
77 private final String name; // zip file name
78 private volatile boolean closeRequested;
79 private Source zsrc;
80 private ZipCoder zc;
81
82 private static final int STORED = ZipEntry.STORED;
83 private static final int DEFLATED = ZipEntry.DEFLATED;
84
85 /**
86 * Mode flag to open a zip file for reading.
87 */
88 public static final int OPEN_READ = 0x1;
89
90 /**
91 * Mode flag to open a zip file and mark it for deletion. The file will be
92 * deleted some time between the moment that it is opened and the moment
|
53 import java.util.stream.Stream;
54 import java.util.stream.StreamSupport;
55 import jdk.internal.misc.JavaUtilZipFileAccess;
56 import jdk.internal.misc.SharedSecrets;
57 import jdk.internal.misc.JavaIORandomAccessFileAccess;
58 import jdk.internal.misc.VM;
59 import jdk.internal.perf.PerfCounter;
60
61 import static java.util.zip.ZipConstants.*;
62 import static java.util.zip.ZipConstants64.*;
63 import static java.util.zip.ZipUtils.*;
64
65 /**
66 * This class is used to read entries from a zip file.
67 *
68 * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
69 * or method in this class will cause a {@link NullPointerException} to be
70 * thrown.
71 *
72 * @author David Connelly
73 * @since 1.1
74 */
75 public
76 class ZipFile implements ZipConstants, Closeable {
77
78 private final String name; // zip file name
79 private volatile boolean closeRequested;
80 private Source zsrc;
81 private ZipCoder zc;
82
83 private static final int STORED = ZipEntry.STORED;
84 private static final int DEFLATED = ZipEntry.DEFLATED;
85
86 /**
87 * Mode flag to open a zip file for reading.
88 */
89 public static final int OPEN_READ = 0x1;
90
91 /**
92 * Mode flag to open a zip file and mark it for deletion. The file will be
93 * deleted some time between the moment that it is opened and the moment
|