//build outputwriter
final BooleanQueryResultWriter out;
if(format == null) {
out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
} else if(SparqlWritersHelper.parseSubType(format).equals("html")) {
out = new SPARQLBooleanHTMLWriter(os);
} else if(SparqlWritersHelper.parseSubType(format).equals("json")) {
out = QueryResultIO.createWriter(BooleanQueryResultFormat.JSON, os);
} else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
} else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {