public static String readFileToString(File f) throws IOException {
  StringWriter sw=new StringWriter();
  IO.copyAndCloseBoth(Common.asReaderUTF8Lenient(new FileInputStream(f)),sw);
  return sw.toString();
}

public static String readFileToString ( File f ) throws IOException { StringWriter sw = new StringWriter ( ) ; IO . copyAndCloseBoth ( Common . asReaderUTF8Lenient ( new FileInputStream ( f ) ) , sw ) ; return sw . toString ( ) ; }
read the contents of the given file into a string
