7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 @bug 4241361 4842702 4985614 6646605 5032358 6923692
26 @summary Make sure we can read a zip file.
27 */
28
29 import java.io.*;
30 import java.nio.file.Files;
31 import java.nio.file.Paths;
32 import java.nio.file.StandardCopyOption;
33 import java.nio.file.StandardOpenOption;
34 import java.util.zip.*;
35
36 public class ReadZip {
37 private static void unreached (Object o)
38 throws Exception
39 {
40 // Should never get here
41 throw new Exception ("Expected exception was not thrown");
42 }
43
44 public static void main(String args[]) throws Exception {
45 try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
46 "input.zip"))) {
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 @bug 4241361 4842702 4985614 6646605 5032358 6923692
26 @summary Make sure we can read a zip file.
27 @key randomness
28 */
29
30 import java.io.*;
31 import java.nio.file.Files;
32 import java.nio.file.Paths;
33 import java.nio.file.StandardCopyOption;
34 import java.nio.file.StandardOpenOption;
35 import java.util.zip.*;
36
37 public class ReadZip {
38 private static void unreached (Object o)
39 throws Exception
40 {
41 // Should never get here
42 throw new Exception ("Expected exception was not thrown");
43 }
44
45 public static void main(String args[]) throws Exception {
46 try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."),
47 "input.zip"))) {
|