use of org.apache.axiom.util.blob.OverflowBlob in project wso2-synapse by wso2.
the class TextFileDataSourceTest method createSourcedElement.
private OMSourcedElement createSourcedElement(String content, Charset charset) throws IOException {
OverflowBlob tmp = new OverflowBlob(4, 1024, "tmp_", ".dat");
OutputStream out = tmp.getOutputStream();
out.write(content.getBytes(charset.name()));
out.close();
return TextFileDataSource.createOMSourcedElement(tmp, charset);
}
Aggregations