Re: Deprecation of HttpEntity#consumeContent()

2008-04-06 Thread Oleg Kalnichevski
On Sun, 2008-04-06 at 12:29 -0400, Sam Berlin wrote: > Hi Oleg, > > I agree the name could be much better, so for that reason deprecating > it is a good idea. However, I think it's very important to continue > to include a method that marks a method as recyclable, so that > responses that are on

Re: Deprecation of HttpEntity#consumeContent()

2008-04-06 Thread Sam Berlin
Hi Oleg, I agree the name could be much better, so for that reason deprecating it is a good idea. However, I think it's very important to continue to include a method that marks a method as recyclable, so that responses that are only partially consumed (or completely unread) can still be reused f

Re: Deprecation of HttpEntity#consumeContent()

2008-04-05 Thread Oleg Kalnichevski
On Thu, 2008-04-03 at 20:12 +0200, Oleg Kalnichevski wrote: > On Thu, 2008-04-03 at 13:00 -0400, Sam Berlin wrote: > > > * As far as streaming entities are concerned #consumeContent is > > > equivalent to a trivial code snippet > > > > > > InputStream instream = entity.getContent(); > > > if (inst

Re: Deprecation of HttpEntity#consumeContent()

2008-04-03 Thread Oleg Kalnichevski
On Thu, 2008-04-03 at 13:00 -0400, Sam Berlin wrote: > > * As far as streaming entities are concerned #consumeContent is > > equivalent to a trivial code snippet > > > > InputStream instream = entity.getContent(); > > if (instream != null) instream.close(); > > Is that all consumeContent does? I

Re: Deprecation of HttpEntity#consumeContent()

2008-04-03 Thread Sam Berlin
> * As far as streaming entities are concerned #consumeContent is > equivalent to a trivial code snippet > > InputStream instream = entity.getContent(); > if (instream != null) instream.close(); Is that all consumeContent does? I was under the impression that it gobbled up the rest of the data (a

Deprecation of HttpEntity#consumeContent()

2008-04-02 Thread Oleg Kalnichevski
Folks, I would like to deprecate the #consumeContent method in the HttpEntity interface for the following reasons: * This method is useful (and applicable) only to one category of entities: streaming blocking entities. It is completely useless for buffering and simply inapplicable to non-blocking