code: public int writeGraphToFile(byte[] img, String file)
  	{
  		File to = new File(file);
  		return writeGraphToFile(img, to);
  	}
docs: 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