public static String readFile ( String fileName , String charset ) { FileInputStream in = null ; try { in = new FileInputStream ( fileName ) ; return read ( in , charset ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } finally { closeQuietly ( in ) ; } }
Reads contents of file fully and returns as string .