test/java/util/zip/ZipFile/ReadZip.java

Print this page

        

@@ -61,10 +61,12 @@
         // bytes padded at the end.
         File newZip = new File(System.getProperty("test.dir", "."), "input2.zip");
         Files.copy(Paths.get(System.getProperty("test.src", ""), "input.zip"),
                    newZip.toPath(), StandardCopyOption.REPLACE_EXISTING);
 
+        newZip.setWritable(true);
+
         // pad some bytes
         try (OutputStream os = Files.newOutputStream(newZip.toPath(),
                                                      StandardOpenOption.APPEND)) {
             os.write(1); os.write(3); os.write(5); os.write(7);
         }