The following statement will create a new file on the graph server:
graph.io(IoCore.graphml()).writer().normalize(true).create().writeGraph(new FileOutputStream("export.graphml"), graph)
I want to use a different OutputStream to see the output directly in my gremlin client. I have tried DataOutputStream() but got a NullPointerException. How would I get the response from writeGraph()?