question: public static String readFileWithExceptions ( final File file ) throws IOException { final BufferedReader in = new BufferedReader ( new FileReader ( file ) ) ; final StringBuilder sb = new StringBuilder ( ) ; String content = "" ; boolean firstline = true ; do { sb . append ( content ) ; content = in . readLine ( ) ; if ( content != null && ! firstline ) { sb . append ( StringLiterals . NEWLINE ) ; } firstline = false ; } while ( content != null ) ; in . close ( ) ; return sb . toString ( ) ; }
target:  Reads given file. Throws exceptions on error.