Concat (Apache Ant API)
Keywords: org.apache.tools.ant.taskdefs.Concat 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 Concat

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.Concat

public class Concat
extends Task

This class contains the 'concat' task, used to concatenate a series of files into a single stream. The destination of this stream may be the system console, or a file. The following is a sample invocation:

     <concat destfile="${build.dir}/index.xml"
       append="false">

       <fileset dir="${xml.root.dir}"
         includes="*.xml" />

     </concat>

Author:
  Derek Slager

Field Summary

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
`Concat()` Public, no-argument constructor.

Method Summary
`void` | `addFilelist(FileList list)` List of files to concatenate.
`void` | `addFileset(FileSet set)` Set of files to concatenate.
`void` | `addText(java.lang.String text)` This method adds text which appears in the 'concat' element.
`void` | `execute()` This method performs the concatenation.
`void` | `reset()` Reset state to default.
`void` | `setAppend(boolean append)` Sets the behavior when the destination file exists.
`void` | `setDestfile(java.io.File destinationFile)` Sets the destination file, or uses the console if not specified.
`void` | `setEncoding(java.lang.String encoding)` Sets the encoding for the input files, used when displaying the data via the console.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

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`

Constructor Detail

### Concat

    public Concat()

  Public, no-argument constructor. Required by Ant.

Method Detail

### setDestfile

    public void setDestfile(java.io.File destinationFile)

  Sets the destination file, or uses the console if not specified.

### setAppend

    public void setAppend(boolean append)

  Sets the behavior when the destination file exists. If set to `true` the stream data will be appended to the existing file, otherwise the existing file will be overwritten. Defaults to `false`.

### setEncoding

    public void setEncoding(java.lang.String encoding)

  Sets the encoding for the input files, used when displaying the data via the console.

### addFileset

    public void addFileset(FileSet set)

  Set of files to concatenate.

### addFilelist

    public void addFilelist(FileList list)

  List of files to concatenate.

### addText

    public void addText(java.lang.String text)

  This method adds text which appears in the 'concat' element.

### execute

    public void execute()
                 throws BuildException

  This method performs the concatenation.

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - if something goes wrong with the build

### reset

    public void reset()

  Reset state to default.

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-2003 Apache Software Foundation. All Rights Reserved.