public static String readString(File file) throws IOException {
  FileInputStream in=new FileInputStream(file);
  try {
    return readString(in);
  }
  finally {
    in.close();
  }
}

public static String readString ( File file ) throws IOException { FileInputStream in = new FileInputStream ( file ) ; try { return readString ( in ) ; } finally { in . close ( ) ; } }
read the contents as a string from the given file .
