public static void writeResultToFile(Result result,String fname) throws Exception {
  PrintWriter outer=new PrintWriter(new BufferedWriter(new FileWriter(fname)));
  outer.write(result.toString());
  outer.close();
}

public static void writeResultToFile ( Result result , String fname ) throws Exception { PrintWriter outer = new PrintWriter ( new BufferedWriter ( new FileWriter ( fname ) ) ) ; outer . write ( result . toString ( ) ) ; outer . close ( ) ; }
writeresulttofile - - write a result ' result ' out in plain text format to file ' fname ' .
