TransferableGraphConfiguration2 conf = new TransferableGraphConfiguration2(graph, resource);
conf.values = false;
- ModelTransferableGraphSource source = graph.syncRequest(new ModelTransferableGraphSourceRequest(conf));
final SerialisationSupport ss = graph.getService(SerialisationSupport.class);
- try {
+ try (ModelTransferableGraphSource source = graph.syncRequest(new ModelTransferableGraphSourceRequest(conf))) {
source.forResourceStatements(graph, new TransferableGraphSourceProcedure<int[]>() {
@Override
});
- source.closeStreams();
-
} catch (Exception e) {
throw new DatabaseException(e);
}