org.mule.mvel2.templates.util.io.StringBuilderStream Maven / Gradle / Ivy
Go to download
MVEL is a powerful expression language for Java-based applications.
It provides a plethora of features and is suited for everything
from the smallest property binding and extraction, to full blown scripts.
This is a fork of MVEL customized for use in Mule.
package org.mule.mvel2.templates.util.io;
import org.mule.mvel2.templates.util.TemplateOutputStream;
public class StringBuilderStream implements TemplateOutputStream {
private StringBuilder appender;
public StringBuilderStream(StringBuilder appender) {
this.appender = appender;
}
public TemplateOutputStream append(CharSequence c) {
appender.append(c);
return this;
}
public TemplateOutputStream append(char[] c) {
appender.append(c);
return this;
}
@Override
public String toString() {
return appender.toString();
}
}