use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class JSON method toStringFlat.
/** JsonValue to a string with no newlines */
public static String toStringFlat(JsonValue jValue) {
try (IndentedLineBuffer b = new IndentedLineBuffer()) {
b.setFlatMode(true);
JSON.write(b, jValue);
return b.asString();
}
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class JsonValue method toString.
@Override
public String toString() {
IndentedLineBuffer buff = new IndentedLineBuffer();
output(buff);
return buff.asString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class JSWriter method outputQuotedString.
public static String outputQuotedString(String string) {
IndentedLineBuffer b = new IndentedLineBuffer();
outputQuotedString(b, string);
return b.asString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class Query method serialize.
/** Convert the query to a string in the given syntax
* @param syntax
*/
public String serialize(Syntax syntax) {
IndentedLineBuffer buff = new IndentedLineBuffer();
serialize(buff, syntax);
return buff.toString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class NodeFmtLib method strNodes.
// Worker
public static String strNodes(Node... nodes) {
IndentedLineBuffer sw = new IndentedLineBuffer();
boolean first = true;
for (Node n : nodes) {
if (!first)
sw.append(" ");
first = false;
str(sw, n);
}
return sw.toString();
}
Aggregations