List of usage examples for org.apache.commons.lang3.text StrSubstitutor replaceIn
public boolean replaceIn(final StrBuilder source)
From source file:org.xmlsh.modules.text.template.java
@Override protected void processStream(Reader r, PrintWriter w) throws IOException { mLogger.entry(r, w);/*w w w .j a v a 2 s. c om*/ StrSubstitutor sub = new StrSubstitutor(mVariables); StringBuilder sb = new StringBuilder(); char cbuf[] = new char[1024]; int len; while ((len = r.read(cbuf)) >= 0) { sb.append(cbuf, 0, len); } boolean result = sub.replaceIn(sb); w.write(sb.toString()); w.flush(); mLogger.exit(); }