org.apache.tools.ant.taskdefs
Class Pack
- Cloneable
public abstract class Pack
Abstract Base class for pack tasks.
bindToOwner , execute , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , log , log , maybeConfigure , perform , reconfigure , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
source
protected File source
zipFile
protected File zipFile
addConfigured
public void addConfigured(ResourceCollection a)
Set the source resource.
a
- the resource to pack as a single element Resource collection.
getSrcResource
public Resource getSrcResource()
The source resource.
pack
protected abstract void pack()
subclasses must implement this method to do their compression
setDestfile
public void setDestfile(File zipFile)
the required destination file.
zipFile
- the destination file
setSrc
public void setSrc(File src)
the file to compress; required.
setSrcResource
public void setSrcResource(Resource src)
The resource to pack; required.
setZipfile
public void setZipfile(File zipFile)
the required destination file.
zipFile
- the destination file
supportsNonFileResources
protected boolean supportsNonFileResources()
Whether this task can deal with non-file resources.
This implementation returns false.
zipFile
protected void zipFile(File file,
OutputStream zOut)
throws IOException
zip a file to an output stream
file
- the file to zipzOut
- the output stream
zipResource
protected void zipResource(Resource resource,
OutputStream zOut)
throws IOException
zip a resource to an output stream
resource
- the resource to zipzOut
- the output stream