Top Description Fields Constructors Methods
org.apache.tools.ant.filters

public final Class ExpandProperties

extends BaseFilterReader
implements ChainableReader
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.filters.ChainableReader
Imports
java.io.IOException, .Reader, org.apache.tools.ant.BuildException, .Project, .PropertyHelper, org.apache.tools.ant.property.GetProperty, .ParseProperties, org.apache.tools.ant.types.PropertySet

Expands Ant properties, if any, in the data.

Example:

<expandproperties/>
Or:
<filterreader
   classname="org.apache.tools.ant.filters.ExpandProperties"/>

Field Summary

Modifier and TypeField and Description
private char[]
private static final int
private int
private PropertySet

Constructor Summary

AccessConstructor and Description
public
ExpandProperties()

Constructor for "dummy" instances.

public
ExpandProperties(final Reader
A Reader object providing the underlying stream. Must not be null.
in
)

Creates a new filtered reader.

Method Summary

Modifier and TypeMethod and Description
public void
add(PropertySet
replacement lookup
propertySet
)

Restrict the expanded properties using a PropertySet.

public Reader

Returns:

a new filter based on this configuration, but filtering the specified reader
chain
(final Reader
A Reader object providing the underlying stream. Must not be null.
rdr
)

Implements org.apache.tools.ant.filters.ChainableReader.chain.

Creates a new ExpandProperties filter using the passed in Reader for instantiation.
public int

Returns:

the next character in the resulting stream, or -1 if the end of the resulting stream has been reached
read
()

Overrides java.io.FilterReader.read.

Returns the next character in the filtered stream.
Inherited from org.apache.tools.ant.filters.BaseFilterReader:
getInitializedgetProjectreadreadFullyreadLinesetInitializedsetProjectskip

Field Detail

bufferback to summary
private char[] buffer
EOFback to summary
private static final int EOF
indexback to summary
private int index
propertySetback to summary
private PropertySet propertySet

Constructor Detail

ExpandPropertiesback to summary
public ExpandProperties()

Constructor for "dummy" instances.

See Also
BaseFilterReader#BaseFilterReader()
ExpandPropertiesback to summary
public ExpandProperties(final Reader in)

Creates a new filtered reader.

Parameters
in:Reader

A Reader object providing the underlying stream. Must not be null.

Method Detail

addback to summary
public void add(PropertySet propertySet)

Restrict the expanded properties using a PropertySet.

Parameters
propertySet:PropertySet

replacement lookup

chainback to summary
public Reader chain(final Reader rdr)

Implements org.apache.tools.ant.filters.ChainableReader.chain.

Creates a new ExpandProperties filter using the passed in Reader for instantiation.

Parameters
rdr:Reader

A Reader object providing the underlying stream. Must not be null.

Returns:Reader

a new filter based on this configuration, but filtering the specified reader

readback to summary
public int read() throws IOException

Overrides java.io.FilterReader.read.

Returns the next character in the filtered stream. The original stream is first read in fully, and the Ant properties are expanded. The results of this expansion are then queued so they can be read character-by-character.

Returns:int

the next character in the resulting stream, or -1 if the end of the resulting stream has been reached

Exceptions
IOException:
if the underlying stream throws an IOException during reading