code: 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();
    }
docs: Get the body.
  
  @param entity the http entity from the response
  @param enc the encoding
  @return the body as a String
  @throws IOException if the body couldn't be fetched