On Wed, 2011-04-20 at 09:32 -0700, Donald Fernandes wrote:
> Hi oleg, 
> 
>  Let me explain the problem first. 
>  when using httpClient 3.1 we were using the getResponseBody api, which was
> resulting in huge jvm consumption for large data files and at time throwing
> out OutOfMemory exceptions. A bit on investigation suggested to use
> getResponseBodyAsStream. But after using the API, I was getting
> AutoCloseInputStream exception... 
> Attempted read on closed stream.
> java.io.IOException: Attempted read on closed stream.
>       at
> org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:183)
>       at
> org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:126)
> 
> Hence i moved to HttpClient 4.1, but with no luck... i had read that you can
> use the EofSensorInputStream not to close the stream.. 
> 
> any pointers on getting this rectified would be of immense help
> 
> Regards,
> Donald
>   

I am sorry I do not understand the problem. Either do not close the
stream or do not read from the stream if you have closed it.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to