protected String getBody ( HttpEntity entity , String enc ) throws IOException { final StringBuilder body = new StringBuilder ( ) ; String buffer = "" ; if ( entity != null ) { final BufferedReader reader = new BufferedReader ( new InputStreamReader ( entity . getContent ( ) , enc ) ) ; while ( ( buffer = reader . readLine ( ) ) != null ) { body . append ( buffer ) ; } reader . close ( ) ; } return body . toString ( ) ; }
Get the body .