org.apache.openjpa.persistence.jest
Class TokenReplacedStream
java.lang.Object
org.apache.openjpa.persistence.jest.TokenReplacedStream
public class TokenReplacedStream
- extends Object
Reads from an input stream and writes to an output stream after replacing matched tokens
by their counterpart.
- Author:
- Pinaki Poddar
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenReplacedStream
public TokenReplacedStream()
replace
public void replace(InputStream in,
Writer out,
String... prs)
throws IOException
- Read the given input stream and replaces the tokens as it reads. The replaced stream is written to the
given output stream.
- Parameters:
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.
- Throws:
IOException
replace
public void replace(Reader in,
Writer out,
String... prs)
throws IOException
- Throws:
IOException
Copyright © 2006–2015 Apache Software Foundation. All rights reserved.