org.apache.tools.ant.taskdefs
public class Concat extends Task implements ResourceCollection
<concat destfile="${build.dir}/index.xml"
append="false">
<fileset dir="${xml.root.dir}"
includes="*.xml" />
</concat>
| Nested Class Summary | |
|---|---|
| static class | Concat.TextElement
sub element points to a file or contains text |
| Constructor Summary | |
|---|---|
| Concat()
Construct a new Concat task. | |
| Method Summary | |
|---|---|
| void | add(ResourceCollection c)
Add an arbitrary ResourceCollection. |
| void | addFilelist(FileList list)
List of files to concatenate. |
| void | addFileset(FileSet set)
Set of files to concatenate. |
| void | addFilterChain(FilterChain filterChain)
Adds a FilterChain. |
| void | addFooter(Concat.TextElement footerToAdd)
Add a footer to the concatenated output |
| void | addHeader(Concat.TextElement headerToAdd)
Add a header to the concatenated output |
| void | addText(String text)
This method adds text which appears in the 'concat' element. |
| Path | createPath()
Path of files to concatenate. |
| void | execute()
Execute the concat task. |
| boolean | isFilesystemOnly()
Implement ResourceCollection. |
| Iterator | iterator()
Implement ResourceCollection. |
| void | reset()
Reset state to default. |
| void | setAppend(boolean append)
Sets the behavior when the destination exists. |
| void | setBinary(boolean binary)
Set the binary attribute. |
| void | setDest(Resource dest)
Set the resource to write to. |
| void | setDestfile(File destinationFile)
Sets the destination file, or uses the console if not specified. |
| void | setEncoding(String encoding)
Sets the character encoding |
| void | setEol(FixCRLF.CrLf crlf)
Specify the end of line to find and to add if
not present at end of each input file. |
| void | setFixLastLine(boolean fixLastLine)
Append line.separator to files that do not end
with a line.separator, default false. |
| void | setForce(boolean forceOverwrite)
Force overwrite existing destination file |
| void | setForceReadOnly(boolean f)
Whether read-only destinations will be overwritten.
|
| void | setIgnoreEmpty(boolean ignoreEmpty)
Sets the behavior when no source resource files are available. |
| void | setOutputEncoding(String outputEncoding)
Sets the character encoding for outputting |
| void | setOverwrite(boolean forceOverwrite)
Force overwrite existing destination file |
| void | setWriter(Writer outputWriter)
Set the output writer. |
| int | size()
Implement ResourceCollection. |
Parameters: c the ResourceCollection to add.
Since: Ant 1.7
Parameters: list the list of files
Parameters: set the set of files
Parameters: filterChain a filterchain to filter the concatenated input
Since: Ant 1.6
Parameters: footerToAdd the footer
Since: Ant 1.6
Parameters: headerToAdd the header
Since: Ant 1.6
Parameters: text the text to be concated.
Returns: the path used for concatenating
Since: Ant 1.6
Returns: false.
Returns: Iterator
true the task will append the stream data an
Appendable resource; otherwise existing content will be
overwritten. Defaults to false.Parameters: append if true append output.
Parameters: binary if true, enable binary mode.
Since: Ant 1.6.2
Parameters: dest the Resource to write to.
Since: Ant 1.8
Parameters: destinationFile the destination file
Parameters: encoding the encoding of the input stream and unless outputencoding is set, the outputstream.
Parameters: crlf the type of new line to add - cr, mac, lf, unix, crlf, or dos
Since: Ant 1.6
Parameters: fixLastLine if true make sure each input file has new line on the concatenated stream
Since: Ant 1.6
Deprecated: use #setOverwrite instead
Force overwrite existing destination fileParameters: forceOverwrite if true always overwrite, otherwise only overwrite if the output file is older any of the input files.
Since: Ant 1.6
Defaults to false
Since: Ant 1.8.2
false the destination file will always be created.
Defaults to true.Parameters: ignoreEmpty if false honour destinationfile creation.
Since: Ant 1.8.0
Parameters: outputEncoding the encoding for the output file
Since: Ant 1.6
Parameters: forceOverwrite if true always overwrite, otherwise only overwrite if the output file is older any of the input files.
Since: Ant 1.8.2
Parameters: outputWriter the output writer.
Since: Ant 1.6
Returns: 1.