I have the following code:
HttpClient FETCHER HttpResponse response = FETCHER.execute(host, httpMethod);
I am trying to read its contents in a line like this:
HttpEntity entity = response.getEntity(); InputStream st = entity.getContent(); StringWriter writer = new StringWriter(); IOUtils.copy(st, writer); String content = writer.toString();
The problem is that when I retrieve http://www.google.co.in/ , the transfer encoding is blocked and I get only the first fragment. He chooses before the first. "
How can I get all the pieces at once so that I can flush the full output and do some processing on it?
Gagan source share