Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class GZip

extends Pack
Class Inheritance
Imports
java.io.IOException, java.nio.file.Files, java.util.zip.GZIPOutputStream, org.apache.tools.ant.BuildException

Compresses a file with the GZIP algorithm. Normally used to compress non-compressed archives such as TAR files.
Since
Ant 1.1

Field Summary

Inherited from org.apache.tools.ant.taskdefs.Pack:
sourcezipFile

Constructor Summary

AccessConstructor and Description
public
GZip()

Method Summary

Modifier and TypeMethod and Description
protected void
pack()

Implements abstract org.apache.tools.ant.taskdefs.Pack.pack.

perform the GZip compression operation.
protected boolean

Returns:

true if this case supports non file resources.
supportsNonFileResources
()

Overrides org.apache.tools.ant.taskdefs.Pack.supportsNonFileResources.

Whether this task can deal with non-file resources.
Inherited from org.apache.tools.ant.taskdefs.Pack:
addConfiguredexecutegetSrcResourcesetDestfilesetSrcsetSrcResourcesetZipfilezipFilezipResource

Constructor Detail

GZipback to summary
public GZip()

Method Detail

packback to summary
protected void pack()

Implements abstract org.apache.tools.ant.taskdefs.Pack.pack.

perform the GZip compression operation.

Annotations
@Override
supportsNonFileResourcesback to summary
protected boolean supportsNonFileResources()

Overrides org.apache.tools.ant.taskdefs.Pack.supportsNonFileResources.

Whether this task can deal with non-file resources.

This implementation returns true only if this task is <gzip>. Any subclass of this class that also wants to support non-file resources needs to override this method. We need to do so for backwards compatibility reasons since we can't expect subclasses to support resources.

Returns:boolean

true if this case supports non file resources.

Annotations
@Override
Since
Ant 1.7