Example:
<copy todir="build">
<fileset dir="src" includes="*.java"/>
<filterchain>
<concatfilter prepend="apache-license-java.txt"/>
</filterchain>
</copy>
Copies all java sources from src to build and adds the content of apache-license-java.txt add the beginning of each file.
| Modifier and Type | Field and Description |
|---|---|
| private File | append
File to add after the content. |
| private Reader | appendReader
Reader for append-file. |
| private File | prepend
File to add before the content. |
| private Reader | prependReader
Reader for prepend-file. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ConcatFilter(final Reader
A Reader object providing the underlying stream.
Must not be in)null.Creates a new filtered reader. |
| Modifier and Type | Method and Description |
|---|---|
| public Reader | Returns: a new filter based on this configuration, but filtering the specified readerA Reader object providing the underlying stream.
Must not be rdr)null.Implements org. |
| public File | |
| public File | |
| private void | initialize()
Scans the parameters list for the "lines" parameter and uses it to set the number of lines to be returned in the filtered stream. |
| public int | Returns: the next character in the resulting stream, or -1 if the end of the resulting stream has been reachedOverrides java. |
| public void | |
| public void |
| append | back to summary |
|---|---|
| private File append File to add after the content. | |
| appendReader | back to summary |
|---|---|
| private Reader appendReader Reader for append-file. | |
| prepend | back to summary |
|---|---|
| private File prepend File to add before the content. | |
| prependReader | back to summary |
|---|---|
| private Reader prependReader Reader for prepend-file. | |
| ConcatFilter | back to summary |
|---|---|
| public ConcatFilter() Constructor for "dummy" instances.
| |
| ConcatFilter | back to summary |
|---|---|
| public ConcatFilter(final Reader in) Creates a new filtered reader.
| |
| chain | back to summary |
|---|---|
| public Reader chain(final Reader rdr) Implements org. Creates a new ConcatReader using the passed in Reader for instantiation. | |
| getAppend | back to summary |
|---|---|
| public File getAppend() Returns append attribute.
| |
| getPrepend | back to summary |
|---|---|
| public File getPrepend() Returns prepend attribute.
| |
| initialize | back to summary |
|---|---|
| private void initialize() throws IOException Scans the parameters list for the "lines" parameter and uses it to set the number of lines to be returned in the filtered stream. also scan for skip parameter. | |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Returns the next character in the filtered stream. If the desired number of lines have already been read, the resulting stream is effectively at an end. Otherwise, the next character from the underlying stream is read and returned.
| |
| setAppend | back to summary |
|---|---|
| public void setAppend(final File append) Sets append attribute.
| |
| setPrepend | back to summary |
|---|---|
| public void setPrepend(final File prepend) Sets prepend attribute.
| |