public static String readFile(File file) throws IOException {
  String contents=FileUtils.file2String(file);
  contents=contents.replaceAll("\r\n","\n");
  return StringUtils.strip(contents);
}

public static String readFile ( File file ) throws IOException { String contents = FileUtils . file2String ( file ) ; contents = contents . replaceAll ( "\r\n" , "\n" ) ; return StringUtils . strip ( contents ) ; }
read an entire file into a string , ignoring any leading or trailing whitespace .
