gd.setGraphLayout(new ISOMLayout(g));
//gd.setLayout(SpringLayout.)
gd.addNotify();
gd.setSize((int) (Math.log(g.numVertices()) * 180), (int) (Math.log(g
.numVertices()) * 180.0));
gd.validate();
PipedOutputStream out = new PipedOutputStream();
PipedInputStream pipedIn;
try {
pipedIn = new PipedInputStream(out);
response.setBody(pipedIn);