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 (instream != null) instream.close();
> > 
> > Is that all consumeContent does?  I was under the impression that it
> > gobbled up the rest of the data (assuming there was unread data), and
> > left the connection in a state that it can be reused by subsequent
> > requests. 
> 
> Sam,
> 
> The initial intent of this method was indeed to ensure the connection
> can be reused, but it just does not work with NIO entities introduced
> recently. Besides, for all existing blocking entities the implementation
> of this method merely closes the input stream and that is it.     
> 
> >  If all it does is close the inputstream (and by extension,
> > close the connection), then I'm +1 on the change.  If it instead read
> > the data & left the connection usable, I'm -1 on it.
> > 
> 
> But this is the responsibility of the underlying input stream #close()
> anyways. This is precisely the reason I do not see a lot of value in
> #consumeContent(). I also do not like the fact its name conflicts with
> that of the ConsumingNHttpEntity#consumeContent().
> 
> Oleg
> 

Sam,

Please let me know if you still object to this change. If not, I'll go
head and commit the changes. Otherwise, I'll leave things as they are.

Oleg 



> 
> > Sam
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to