* @throws RDFHandlerException
*/
private InputStream writeJSONLD(Model statements) throws RDFHandlerException {
final StringWriter writer = new StringWriter();
final RDFWriter jsonldWriter = new SesameJSONLDWriter(writer);
jsonldWriter.startRDF();
for (final Statement nextStatement : statements) {
jsonldWriter.handleStatement(nextStatement);
}
jsonldWriter.endRDF();
// System.out.println(writer.toString());
return new ByteArrayInputStream(writer.toString().getBytes(Charset.forName("UTF-8")));
}