Pack (Apache Ant API)
Keywords: org.apache.tools.ant.taskdefs.Pack,Pack class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected java.io.File` | `source`
`protected java.io.File` | `zipFile`

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

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` | `setDestfile(java.io.File zipFile)` the required destination file.
`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, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### zipFile

    protected java.io.File zipFile

### source

    protected java.io.File source

Constructor Detail

### Pack

    public Pack()

Method Detail

### setZipfile

    public void setZipfile(java.io.File zipFile)

  the required destination file.

  Parameters:
    `zipFile` -

### setDestfile

    public void setDestfile(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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.