org.apache.tools.ant.taskdefs

Class Pack

public abstract class Pack extends Task

Abstract Base class for pack tasks.

Since: Ant 1.5

Field Summary
protected Filesource
protected FilezipFile
Method Summary
voidexecute()
validate, then hand off to the subclass
protected abstract voidpack()
subclasses must implement this method to do their compression
voidsetDestfile(File zipFile)
the required destination file.
voidsetSrc(File src)
the file to compress; required.
voidsetZipfile(File zipFile)
the required destination file.
protected voidzipFile(File file, OutputStream zOut)
zip a file to an output stream

Field Detail

source

protected File source

zipFile

protected File zipFile

Method Detail

execute

public void execute()
validate, then hand off to the subclass

Throws: BuildException

pack

protected abstract void pack()
subclasses must implement this method to do their compression

setDestfile

public void setDestfile(File zipFile)
the required destination file.

Parameters: zipFile

setSrc

public void setSrc(File src)
the file to compress; required.

Parameters: src

setZipfile

public void setZipfile(File zipFile)
the required destination file.

Parameters: zipFile

zipFile

protected void zipFile(File file, OutputStream zOut)
zip a file to an output stream

Parameters: file zOut

Throws: IOException

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