public static String readFileToString(File file) throws IOException {
  return readFileToString(file,Charset.defaultCharset());
}

public static String readFileToString ( File file ) throws IOException { return readFileToString ( file , Charset . defaultCharset ( ) ) ; }
reads the contents of a file into a string using the default encoding for the vm . the file is always closed .
