use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class WriterPath method asString.
public static String asString(Path path, Prologue prologue) {
IndentedLineBuffer buff = new IndentedLineBuffer();
WriterPathVisitor w = new WriterPathVisitor(buff, prologue);
path.visit(w);
w.out.flush();
return buff.asString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class WriterExpr method asString.
public static String asString(Expr expr) {
IndentedLineBuffer b = new IndentedLineBuffer();
output(b, expr, new SerializationContext());
return b.asString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class ValidatorHtmlLib method output.
public static void output(ServletOutputStream outStream, Consumer<IndentedLineBuffer> content, boolean lineNumbers) throws IOException {
startFixed(outStream);
IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers);
content.accept(out);
out.flush();
String x = htmlQuote(out.asString());
byte[] b = x.getBytes("UTF-8");
outStream.write(b);
finishFixed(outStream);
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class UpdateValidatorJSON method formatted.
private static void formatted(JsonBuilder obj, UpdateRequest updateRequest) {
IndentedLineBuffer out = new IndentedLineBuffer();
updateRequest.output(out);
obj.key(jFormatted).value(out.asString());
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class NodeFmtLib method str.
public static String str(Node n) {
IndentedLineBuffer sw = new IndentedLineBuffer();
str(sw, n);
return sw.toString();
}
Aggregations