| Modifier and Type | Field and Description | 
|---|---|
| protected File | source | 
| protected File | zipFile | 
| Constructor and Description | 
|---|
| Pack() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addConfigured(ResourceCollection a)Set the source resource. | 
| void | execute()validate, then hand off to the subclass | 
| Resource | getSrcResource()The source resource. | 
| protected abstract void | pack()subclasses must implement this method to do their compression | 
| void | setDestfile(File zipFile)the required destination file. | 
| void | setSrc(File src)the file to compress; required. | 
| void | setSrcResource(Resource src)The resource to pack; required. | 
| void | setZipfile(File zipFile)the required destination file. | 
| protected boolean | supportsNonFileResources()Whether this task can deal with non-file resources. | 
| protected void | zipFile(File file,
       OutputStream zOut)zip a file to an output stream | 
| protected void | zipResource(Resource resource,
           OutputStream zOut)zip a resource to an output stream | 
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectpublic void addConfigured(ResourceCollection a)
a - the resource to pack as a single element Resource collection.public void execute()
             throws BuildException
execute in class TaskBuildException - on errorpublic Resource getSrcResource()
protected abstract void pack()
public void setDestfile(File zipFile)
zipFile - the destination filepublic void setSrc(File src)
src - the source filepublic void setSrcResource(Resource src)
src - resource to expandpublic void setZipfile(File zipFile)
zipFile - the destination fileprotected boolean supportsNonFileResources()
This implementation returns false.
protected void zipFile(File file, OutputStream zOut) throws IOException
file - the file to zipzOut - the output streamIOException - on errorprotected void zipResource(Resource resource, OutputStream zOut) throws IOException
resource - the resource to zipzOut - the output streamIOException - on error