Esempio n. 1
0
 /**
  * Writes the graph's image in a file.
  *
  * @param img A byte array containing the image of the graph.
  * @param file Name of the file to where we want to write.
  * @return Success: 1, Failure: -1
  */
 public void writeGraphToFile(byte[] img, String file) throws java.io.IOException {
   File to = new File(file);
   writeGraphToFile(img, to);
 }
Esempio n. 2
0
 public void writeGraphToFile(int MAX_CHARS) throws java.io.IOException {
   super.addln(end_graph());
   super.writeGraphToFile(getDotSource().getBytes(), new File(_filename + ".dot"));
   super.writeGraphToFile(
       getGraph(truncateLabels(getDotSource(), MAX_CHARS)), new File(_filename + ".gif"));
 }