|
Pack (Apache Ant API)
org.apache.tools.ant.taskdefs
Class Pack
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.Pack
- Direct Known Subclasses:
- BZip2, GZip
- public abstract class Pack
- extends Task
Abstract Base class for pack tasks.
- Since:
- Ant 1.5
- Author:
- Magesh Umasankar
Field Summary |
protected java.io.File |
source
|
protected java.io.File |
zipFile
|
Constructor Summary |
Pack()
|
Method Summary |
void |
execute()
validate, then hand off to the subclass |
protected abstract void |
pack()
subclasses must implement this method to do their compression |
void |
setSrc(java.io.File src)
the file to compress; required. |
void |
setZipfile(java.io.File zipFile)
the required destination file. |
protected void |
zipFile(java.io.File file,
java.io.OutputStream zOut)
zip a file to an output stream |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zipFile
protected java.io.File zipFile
source
protected java.io.File source
Pack
public Pack()
setZipfile
public void setZipfile(java.io.File zipFile)
- the required destination file.
- Parameters:
zipFile -
setSrc
public void setSrc(java.io.File src)
- the file to compress; required.
- Parameters:
src -
execute
public void execute()
throws BuildException
- validate, then hand off to the subclass
- Overrides:
execute in class Task
- Throws:
BuildException
zipFile
protected void zipFile(java.io.File file,
java.io.OutputStream zOut)
throws java.io.IOException
- zip a file to an output stream
- Parameters:
file - zOut -
- Throws:
java.io.IOException
pack
protected abstract void pack()
- subclasses must implement this method to do their compression
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.
|