public static void saveGraph(DirectedGraph<Integer,DefaultEdge> graph,String location) throws IOException {
  File file=new File(location);
  file.createNewFile();
  if (!file.canWrite()) {
    throw new IOException("Cannot write to file " + location);
  }
  GraphSerialization.saveGraph(graph,file);
}

public static void saveGraph ( DirectedGraph < Integer , DefaultEdge > graph , String location ) throws IOException { File file = new File ( location ) ; file . createNewFile ( ) ; if ( ! file . canWrite ( ) ) { throw new IOException ( "Cannot write to file " + location ) ; } GraphSerialization . saveGraph ( graph , file ) ; }
serializes the given directedgraph object to the given location .
