private static String readWithStringBuffer ( final Reader fr ) throws IOException { final BufferedReader br = new BufferedReader ( fr ) ; String line ; final StringBuilder result = new StringBuilder ( ) ; while ( ( line = br . readLine ( ) ) != null ) { result . append ( line ) ; } return result . toString ( ) ; }
Read with string buffer .