public class TokenReplacingReader extends Reader
read(char[], int, int) and added support for escaping.
The following constructs have been added:
${p:v} if token p is not found in the backing map, the provided value v is used
instead of keeping the literal "${p}" in the output.${p1,p2:v} if token p1 is not found in the backing map, the expression is replaced by the
value of token p2 or value v if p2 is not present either.| Constructor and Description |
|---|
TokenReplacingReader(String source,
Map<String,String> tokens) |
TokenReplacingReader(String source,
Map<String,String> tokens,
Deque<String> activeTokens,
Map<String,String> resolvedTokens) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(char[] cbuf) |
int |
read(char[] cbuf,
int off,
int len) |
int |
read(CharBuffer target) |
boolean |
ready() |
void |
reset() |
long |
skip(long n) |
public int read(CharBuffer target) throws IOException
read in interface Readableread in class ReaderIOExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf)
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic long skip(long n)
throws IOException
skip in class ReaderIOExceptionpublic boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOExceptionpublic void reset()
throws IOException
reset in class ReaderIOExceptionCopyright © 2015 Red Hat, Inc.. All rights reserved.