Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 10:57 -0400, Srinivas Nagesh wrote: > Ok. Thanks. > > Are there any down sides to not using EntityUtils.consume? You do not have to use EntityUtils#consume but you must ensure the content input stream gets closed when you are done reading from it. > Also what > is the rele

Re: Exception while consuming Content

2011-06-14 Thread Srinivas Nagesh
Ok. Thanks. Are there any down sides to not using EntityUtils.consume? Also what is the release date for 4.1.2? On Jun 14, 2011, at 9:25 AM, Oleg Kalnichevski wrote: > On Tue, 2011-06-14 at 08:59 -0400, Srinivas wrote: >> I am sorry I meant to say "consume". I cant use a snapshot because we hav

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 08:59 -0400, Srinivas wrote: > I am sorry I meant to say "consume". I cant use a snapshot because we have > to roll this piece of code into Production later this week. What do you > recommend in this case? > Use DefaultHttpClient instead of CotnentEncodingHttpClient and deco

Re: Exception while consuming Content

2011-06-14 Thread Srinivas
I am sorry I meant to say "consume". I cant use a snapshot because we have to roll this piece of code into Production later this week. What do you recommend in this case? On Tue, Jun 14, 2011 at 8:57 AM, Oleg Kalnichevski wrote: > On Tue, 2011-06-14 at 08:51 -0400, Srinivas wrote: > > Thanks for

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 08:51 -0400, Srinivas wrote: > Thanks for the link to the defect. > > I changed my code to use > EntityUtils.toString(response.getEntity()); > > and removed the call to EntityUtils.close(response.getEntity()); > > When I enable debug logs; I can see that the toString method

Re: Exception while consuming Content

2011-06-14 Thread Srinivas
Thanks for the link to the defect. I changed my code to use EntityUtils.toString(response.getEntity()); and removed the call to EntityUtils.close(response.getEntity()); When I enable debug logs; I can see that the toString method also returns the connection back to the connection manager. So I w

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Mon, 2011-06-13 at 14:38 -0400, Srinivas wrote: > I am getting an exception while trying to get the content from a > HttpResponse. > > Code: > > String message = IOUtils.toString(response.getEntity().getContent()); > ... // Do Something with InputStream > > EntityUtils.close(response.getEntit

Exception while consuming Content

2011-06-13 Thread Srinivas
I am getting an exception while trying to get the content from a HttpResponse. Code: String message = IOUtils.toString(response.getEntity().getContent()); ... // Do Something with InputStream EntityUtils.close(response.getEntity()); In EntityUtils class close method; I get an IOException at lin