use of org.apache.jena.sparql.engine.binding.BindingOutputStream in project jena by apache.
the class ResultSetFormatter method outputAsBIO.
/** Output a result set in BIO format
* @deprecated Exprimental - may be removed
*/
@Deprecated
public static void outputAsBIO(OutputStream out, ResultSet results) {
List<Var> vars = Var.varList(results.getResultVars());
BindingOutputStream bout = new BindingOutputStream(out, vars);
for (; results.hasNext(); ) {
Binding b = BindingUtils.asBinding(results.next());
bout.write(b);
}
bout.flush();
}
use of org.apache.jena.sparql.engine.binding.BindingOutputStream in project jena by apache.
the class bindings method main.
public static void main(String[] args) {
InputStream in = System.in;
OutputStream out = System.out;
BindingInputStream input = new BindingInputStream(in);
BindingOutputStream output = new BindingOutputStream(out);
for (; input.hasNext(); ) output.send(input.next());
output.flush();
}
Aggregations