public String getStringBody ( Charset charset ) throws IOException { BufferedReader rd = new BufferedReader ( new InputStreamReader ( getInputStreamBody ( ) , charset ) ) ; String line ; StringBuilder response = new StringBuilder ( ) ; while ( ( line = rd . readLine ( ) ) != null ) { if ( response . length ( ) != 0 ) { response . append ( ' ' ) ; } response . append ( line ) ; } rd . close ( ) ; return response . toString ( ) ; }
Get the response body as string