From d13027731c6967326a772f141a3cdbbe9a1fa79b Mon Sep 17 00:00:00 2001
From: Stefan Bodewig The task ZKMTask allows the Zelix KlassMaster Java obfuscator to be integrated into an Ant build.
+
+ Zelix KlassMaster Java Obfuscator
+
+
+
diff --git a/src/etc/testcases/taskdefs/unzip.xml b/src/etc/testcases/taskdefs/unzip.xml
index 9b979f6e0..1fcc4d881 100644
--- a/src/etc/testcases/taskdefs/unzip.xml
+++ b/src/etc/testcases/taskdefs/unzip.xml
@@ -27,6 +27,12 @@
+
+
+ Compatibility:
+
+
+ Ant 1.4.1
+
+
+
+
+ URL:
+
+
+ Zelix KlassMaster Ant Task
+
+
+
+ License:
+
+
+ Commercial
+
If RandomAccessFile cannot be used, this implementation will use - * a Data Descriptor to store size and - * CRC information for DEFLATED entries, this means, you don't need to + * a Data Descriptor to store size and CRC information for {@link + * #DEFLATED DEFLATED} entries, this means, you don't need to * calculate them yourself. Unfortunately this is not possible for - * the STORED method, here setting the CRC and uncompressed size - * information is required before {@link #putNextEntry putNextEntry} - * will be called.
+ * the {@link #STORED STORED} method, here setting the CRC and + * uncompressed size information is required before {@link + * #putNextEntry putNextEntry} can be called. * * @author Stefan Bodewig * @author Richard Evans @@ -290,6 +290,20 @@ public class ZipOutputStream extends FilterOutputStream { } } + /** + * Is this archive writing to a seekable stream (i.e. a random + * access file)? + * + *For seekable streams, you don't need to calculate the CRC or + * uncompressed size for {@link #STORED STORED} entries before + * invoking {@link #putEntry putEntry}. + * + * @since 1.17 + */ + public boolean isSeekable() { + return raf != null; + } + /** * The encoding to use for filenames and the file comment. * diff --git a/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java b/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java index 09f0fee4b..a9a01e790 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java @@ -101,6 +101,13 @@ public class UnzipTest extends BuildFileTest { project.resolveFile("asf-logo.gif"))); } + public void testTestUncompressedZipTask() throws java.io.IOException { + FileUtils fileUtils = FileUtils.newFileUtils(); + executeTarget("testUncompressedZipTask"); + assertTrue(fileUtils.contentEquals(project.resolveFile("../asf-logo.gif"), + project.resolveFile("asf-logo.gif"))); + } + /* * PR 11100 */