// method to print edge points out to a file public void printEdgePointsToFile(String filename) { try { PrintWriter writer = new PrintWriter(filename, "UTF-8"); for (MapEdge e : edges) { writer.println(e.getStartPoint() + " " + e.getEndPoint()); } writer.flush(); writer.close(); } catch (Exception e) { System.out.println("Exception opening file " + e); } }