java.io.Closeable
, java.lang.AutoCloseable
, java.lang.Readable
, ChainableReader
, Parameterizable
public final class ConcatFilter extends BaseParamFilterReader implements ChainableReader
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.
Constructor | Description |
---|---|
ConcatFilter() |
Constructor for "dummy" instances.
|
ConcatFilter(java.io.Reader in) |
Creates a new filtered reader.
|
Modifier and Type | Method | Description |
---|---|---|
java.io.Reader |
chain(java.io.Reader rdr) |
Creates a new ConcatReader using the passed in
Reader for instantiation.
|
java.io.File |
getAppend() |
Returns append attribute.
|
java.io.File |
getPrepend() |
Returns prepend attribute.
|
int |
read() |
Returns the next character in the filtered stream.
|
void |
setAppend(java.io.File append) |
Sets append attribute.
|
void |
setPrepend(java.io.File prepend) |
Sets prepend attribute.
|
getInitialized, getProject, read, readFully, readLine, setInitialized, setProject, skip
getParameters, setParameters
public ConcatFilter()
BaseFilterReader()
public ConcatFilter(java.io.Reader in)
in
- A Reader object providing the underlying stream.
Must not be null
.public int read() throws java.io.IOException
read
in class java.io.FilterReader
java.io.IOException
- if the underlying stream throws an IOException
during readingpublic void setPrepend(java.io.File prepend)
prepend
- new valuepublic java.io.File getPrepend()
public void setAppend(java.io.File append)
append
- new valuepublic java.io.File getAppend()
public java.io.Reader chain(java.io.Reader rdr)
chain
in interface ChainableReader
rdr
- A Reader object providing the underlying stream.
Must not be null
.