From e0b4aa354fffba64c11b4c01282199cb7d043a69 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 27 Aug 2009 02:59:15 +0000 Subject: [PATCH] provide access to compression method git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@808262 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/types/resources/ZipResource.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/org/apache/tools/ant/types/resources/ZipResource.java b/src/main/org/apache/tools/ant/types/resources/ZipResource.java index 29c911f8f..4e14720c7 100644 --- a/src/main/org/apache/tools/ant/types/resources/ZipResource.java +++ b/src/main/org/apache/tools/ant/types/resources/ZipResource.java @@ -41,6 +41,7 @@ public class ZipResource extends ArchiveResource { private String encoding; private ZipExtraField[] extras; + private int method; /** * Default constructor. @@ -183,6 +184,14 @@ public class ZipResource extends ArchiveResource { return extras; } + /** + * The compression method that has been used. + * @since Ant 1.8.0 + */ + public int getMethod() { + return method; + } + /** * fetches information from the named entry inside the archive. */ @@ -211,6 +220,7 @@ public class ZipResource extends ArchiveResource { setSize(e.getSize()); setMode(e.getUnixMode()); extras = e.getExtraFields(); + method = e.getMethod(); } }