public class TokenReplacedStream extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TokenReplacedStream.Pattern |
| Constructor and Description |
|---|
TokenReplacedStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
replace(InputStream in,
Writer out,
String... prs)
Read the given input stream and replaces the tokens as it reads.
|
void |
replace(Reader in,
Writer out,
String... prs) |
public void replace(InputStream in, Writer out, String... prs) throws IOException
in - a non-null input streamout - a character oriented writerreplacements - an even number of Strings. Any occurrence of the even-indexed i-th String in the
input stream will be replaced by the (i+1)-th String in the output writer.IOExceptionpublic void replace(Reader in, Writer out, String... prs) throws IOException
IOExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.