|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.Pack
public abstract class Pack
Abstract Base class for pack tasks.
Field Summary | |
---|---|
protected java.io.File |
source
|
protected java.io.File |
zipFile
|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
Pack()
|
Method Summary | |
---|---|
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(java.io.File zipFile)
the required destination file. |
void |
setSrc(java.io.File src)
the file to compress; required. |
void |
setSrcResource(Resource src)
The resource to pack; required. |
void |
setZipfile(java.io.File zipFile)
the required destination file. |
protected boolean |
supportsNonFileResources()
Whether this task can deal with non-file resources. |
protected void |
zipFile(java.io.File file,
java.io.OutputStream zOut)
zip a file to an output stream |
protected void |
zipResource(Resource resource,
java.io.OutputStream zOut)
zip a resource to an output stream |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File zipFile
protected java.io.File source
Constructor Detail |
---|
public Pack()
Method Detail |
---|
public void setZipfile(java.io.File zipFile)
zipFile
- the destination filepublic void setDestfile(java.io.File zipFile)
zipFile
- the destination filepublic void setSrc(java.io.File src)
src
- the source filepublic void setSrcResource(Resource src)
src
- resource to expandpublic void addConfigured(ResourceCollection a)
a
- the resource to pack as a single element Resource collection.public void execute() throws BuildException
execute
in class Task
BuildException
- on errorprotected void zipFile(java.io.File file, java.io.OutputStream zOut) throws java.io.IOException
file
- the file to zipzOut
- the output stream
java.io.IOException
- on errorprotected void zipResource(Resource resource, java.io.OutputStream zOut) throws java.io.IOException
resource
- the resource to zipzOut
- the output stream
java.io.IOException
- on errorprotected abstract void pack()
public Resource getSrcResource()
protected boolean supportsNonFileResources()
This implementation returns false.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |