}
}
}
in.close();
graph.getModel().endUpdate();
mxGraphComponent graphComponent = new mxGraphComponent(graph);
getContentPane().add(graphComponent);
try {
// Creates the image for the PNG file
BufferedImage image = mxCellRenderer.createBufferedImage(graph,
null, 1, Color.WHITE, graphComponent.isAntiAlias(), null,
graphComponent.getCanvas());
// Creates the URL-encoded XML data
mxCodec codec = new mxCodec();
String xml = URLEncoder.encode(mxUtils.getXml(codec.encode(graph.getModel())), "UTF-8");
mxPngEncodeParam param = mxPngEncodeParam.getDefaultEncodeParam(image);