|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
java.io.FilterReader
org.codehaus.plexus.util.InterpolationFilterReader
public class InterpolationFilterReader
A FilterReader which interpolates keyword values into a character stream. Keywords are recognized when enclosed between starting and ending delimiter strings. The keywords themselves, and their values, are fetched from a Map supplied to the constructor.
When a possible keyword token is recognized (by detecting the starting and ending token delimiters):
LineOrientedInterpolatingReader,
org.codehaus.plexus.interpolation| Field Summary |
|---|
| Fields inherited from class java.io.FilterReader |
|---|
in |
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
InterpolationFilterReader(Reader in,
Map variables)
Construct a Reader using the default interpolation delimiter tokens "${" and "}". |
|
InterpolationFilterReader(Reader in,
Map variables,
String beginToken,
String endToken)
Construct a Reader to interpolate values enclosed between the given delimiter tokens. |
|
| Method Summary | |
|---|---|
int |
read()
Returns the next character in the filtered stream, replacing tokens from the original stream. |
int |
read(char[] cbuf,
int off,
int len)
Reads characters into a portion of an array. |
long |
skip(long n)
Skips characters. |
| Methods inherited from class java.io.FilterReader |
|---|
close, mark, markSupported, ready, reset |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterpolationFilterReader(Reader in,
Map variables,
String beginToken,
String endToken)
in - a Reader to be wrapped for interpolation.variables - name/value pairs to be interpolated into the character stream.beginToken - an interpolation target begins with this.endToken - an interpolation target ends with this.
public InterpolationFilterReader(Reader in,
Map variables)
in - a Reader to be wrapped for interpolation.variables - name/value pairs to be interpolated into the character stream.| Method Detail |
|---|
public long skip(long n)
throws IOException
skip in class FilterReadern - The number of characters to skip
IllegalArgumentException - If n is negative.
IOException - If an I/O error occurs
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class FilterReadercbuf - Destination buffer to write characters to.
Must not be null.off - Offset at which to start storing characters.len - Maximum number of characters to read.
IOException - If an I/O error occurs
public int read()
throws IOException
read in class FilterReaderIOException - if the underlying stream throws an IOException
during reading
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||