<prefixlines prefix="Foo"/>Or:
<filterreader classname="org.apache.tools.ant.filters.PrefixLines"> <param name="prefix" value="Foo"/> </filterreader>
Modifier and Type | Field and Description |
---|---|
private String | prefix
The prefix to be used. |
private static final String | PREFIX_KEY
Parameter name for the prefix. |
private String | queuedData
Data that must be read from, if not null. |
Access | Constructor and Description |
---|---|
public | |
public | PrefixLines(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. |
private String | Returns: the prefix which will be added at the start of each input lineReturns the prefix which will be added at the start of each input line. |
private void | |
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 |
prefix | back to summary |
---|---|
private String prefix The prefix to be used. |
PREFIX_KEY | back to summary |
---|---|
private static final String PREFIX_KEY Parameter name for the prefix. |
queuedData | back to summary |
---|---|
private String queuedData Data that must be read from, if not null. |
PrefixLines | back to summary |
---|---|
public PrefixLines() Constructor for "dummy" instances.
|
PrefixLines | back to summary |
---|---|
public PrefixLines(final Reader in) Creates a new filtered reader.
|
chain | back to summary |
---|---|
public Reader chain(final Reader rdr) Implements org. Creates a new PrefixLines filter using the passed in Reader for instantiation. |
getPrefix | back to summary |
---|---|
private String getPrefix() Returns the prefix which will be added at the start of each input line.
|
initialize | back to summary |
---|---|
private void initialize() Initializes the prefix if it is available from the parameters. |
read | back to summary |
---|---|
public int read() throws IOException Overrides java. Returns the next character in the filtered stream. One line is read from the original input, and the prefix added. The resulting line is then used until it ends, at which point the next original line is read, etc.
|
setPrefix | back to summary |
---|---|
public void setPrefix(final String prefix) Sets the prefix to add at the start of each input line.
|