org.apache.tools.ant.types

Class ZipFileSet

public class ZipFileSet extends ArchiveFileSet

A ZipFileSet is a FileSet with extra attributes useful in the context of Zip/Jar tasks. A ZipFileSet extends FileSets with the ability to extract a subset of the entries of a Zip file for inclusion in another Zip file. It also includes a prefix attribute which is prepended to each entry in the output Zip file. Since ant 1.6 ZipFileSet can be defined with an id and referenced in packaging tasks
Constructor Summary
ZipFileSet()
Constructor for ZipFileSet
protected ZipFileSet(FileSet fileset)
Constructor using a fileset arguement.
protected ZipFileSet(ZipFileSet fileset)
Constructor using a zipfileset arguement.
Method Summary
Objectclone()
Return a ZipFileSet that has the same properties as this one.
StringgetEncoding()
Get the encoding used for this ZipFileSet.
protected AbstractFileSetgetRef(Project p)
A ZipFileset accepts another ZipFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
protected ArchiveScannernewArchiveScanner()
Return a new archive scanner based on this one.
voidsetEncoding(String enc)
Set the encoding used for this ZipFileSet.

Constructor Detail

ZipFileSet

public ZipFileSet()
Constructor for ZipFileSet

ZipFileSet

protected ZipFileSet(FileSet fileset)
Constructor using a fileset arguement.

Parameters: fileset the fileset to use

ZipFileSet

protected ZipFileSet(ZipFileSet fileset)
Constructor using a zipfileset arguement.

Parameters: fileset the zipfileset to use

Method Detail

clone

public Object clone()
Return a ZipFileSet that has the same properties as this one.

Returns: the cloned zipFileSet

getEncoding

public String getEncoding()
Get the encoding used for this ZipFileSet.

Returns: String encoding.

Since: Ant 1.7

getRef

protected AbstractFileSet getRef(Project p)
A ZipFileset accepts another ZipFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute

Parameters: p the project to use

Returns: the abstract fileset instance

newArchiveScanner

protected ArchiveScanner newArchiveScanner()
Return a new archive scanner based on this one.

Returns: a new ZipScanner with the same encoding as this one.

setEncoding

public void setEncoding(String enc)
Set the encoding used for this ZipFileSet.

Parameters: enc encoding as String.

Since: Ant 1.7