org.apache.tools.ant.taskdefs

Class Expand

public class Expand extends Task

Unzip a file.

Since: Ant 1.1

UNKNOWN: category="packaging" name="unzip" name="unjar" name="unwar"

Method Summary
voidaddFileset(FileSet set)
Add a fileset
voidaddPatternset(PatternSet set)
Add a patternset
voidexecute()
Do the work.
protected voidexpandFile(FileUtils fileUtils, File srcF, File dir)
protected voidextractFile(FileUtils fileUtils, File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory)
voidsetDest(File d)
Set the destination directory.
voidsetEncoding(String encoding)
Sets the encoding to assume for file names and comments.
voidsetOverwrite(boolean b)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
voidsetSrc(File s)
Set the path to zip-file.

Method Detail

addFileset

public void addFileset(FileSet set)
Add a fileset

addPatternset

public void addPatternset(PatternSet set)
Add a patternset

execute

public void execute()
Do the work.

Throws: BuildException Thrown in unrecoverable error.

expandFile

protected void expandFile(FileUtils fileUtils, File srcF, File dir)

extractFile

protected void extractFile(FileUtils fileUtils, File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory)

setDest

public void setDest(File d)
Set the destination directory. File will be unzipped into the destination directory.

Parameters: d Path to the directory.

setEncoding

public void setEncoding(String encoding)
Sets the encoding to assume for file names and comments.

Set to native-encoding if you want your platform's native encoding, defaults to UTF8.

Since: Ant 1.6

setOverwrite

public void setOverwrite(boolean b)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?

setSrc

public void setSrc(File s)
Set the path to zip-file.

Parameters: s Path to zip-file.

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.