public class TokenReplacedStream
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TokenReplacedStream.Pattern |
Constructor and Description |
---|
TokenReplacedStream() |
Modifier and Type | Method and Description |
---|---|
(package private) int |
match(char c,
TokenReplacedStream.Pattern... patterns)
Match the given character to all patterns and return the index of highest match.
|
(package private) TokenReplacedStream.Pattern |
matched(TokenReplacedStream.Pattern... patterns)
Gets the pattern if any in matched state
|
void |
replace(java.io.InputStream in,
java.io.Writer out,
java.lang.String... prs)
Read the given input stream and replaces the tokens as it reads.
|
(package private) void |
reset(TokenReplacedStream.Pattern... patterns)
Resets all the patterns.
|
public void replace(java.io.InputStream in, java.io.Writer out, java.lang.String... prs) throws java.io.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.java.io.IOException
int match(char c, TokenReplacedStream.Pattern... patterns)
c
- a character to matchpatterns
- an array of patternsTokenReplacedStream.Pattern matched(TokenReplacedStream.Pattern... patterns)
patterns
- void reset(TokenReplacedStream.Pattern... patterns)
patterns
- Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.