public static String slurpFile ( String filename , String encoding ) throws IOException { Reader r = new InputStreamReader ( new FileInputStream ( filename ) , encoding ) ; return IOUtils . slurpReader ( r ) ; }
Returns all the text in the given file with the given encoding .