hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Berlin" <sber...@gmail.com>
Subject Re: Deprecation of HttpEntity#consumeContent()
Date Thu, 03 Apr 2008 17:00:16 GMT
> * 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.  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.

Sam

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message