public static void saveGraph(DirectedGraph<Integer,DefaultEdge> graph,File file) throws IOException {
  SerializableDirectedGraph serialGraph=new SerializableDirectedGraph(graph);
  FileOutputStream fos=null;
  ObjectOutputStream out=null;
  fos=new FileOutputStream(file);
  out=new ObjectOutputStream(fos);
  out.writeObject(serialGraph);
  out.close();
}

public static void saveGraph ( DirectedGraph < Integer , DefaultEdge > graph , File file ) throws IOException { SerializableDirectedGraph serialGraph = new SerializableDirectedGraph ( graph ) ; FileOutputStream fos = null ; ObjectOutputStream out = null ; fos = new FileOutputStream ( file ) ; out = new ObjectOutputStream ( fos ) ; out . writeObject ( serialGraph ) ; out . close ( ) ; }
serializes the given directedgraph object to the given location .
