Guidance on the use of EntityUtils.consume

2011-12-06 Thread Todd W Lainhart
The javadoc for HttpEntity.consumeContent() is copied below. I can't tell if best practice is to use EntityUtils.consume, or just close the input stream associated to the entity. I'm guessing the latter, but there may be an idiom that I'm missing. /** * This method is deprecated sinc

Re: Guidance on the use of EntityUtils.consume

2011-12-06 Thread William Speirs
As per the documentation, HttpEntity.consumeContent() is deprecated. You should use EntityUtils.consume() instead. The code for that is straightforward: public static void consume(final HttpEntity entity) throws IOException { if (entity == null) { return; }

Re: Guidance on the use of EntityUtils.consume

2011-12-06 Thread Todd W Lainhart
(T/L) lainh...@us.ibm.com From: William Speirs To: HttpClient User Discussion Date: 12/06/2011 04:46 PM Subject:Re: Guidance on the use of EntityUtils.consume As per the documentation, HttpEntity.consumeContent() is deprecated. You should use EntityUtils.consume() instead

Re: Guidance on the use of EntityUtils.consume

2011-12-06 Thread William Speirs
nt User Discussion > Date: 12/06/2011 04:46 PM > Subject:Re: Guidance on the use of EntityUtils.consume > > > > As per the documentation, HttpEntity.consumeContent() is deprecated. > You should use EntityUtils.consume() instead. The code for that is > straightforward:

Re: Guidance on the use of EntityUtils.consume

2011-12-06 Thread Todd W Lainhart
l software IBM Corporation 550 King Street, Littleton, MA 01460-1250 1-978-899-4705 2-276-4705 (T/L) lainh...@us.ibm.com From: William Speirs To: HttpClient User Discussion Date: 12/06/2011 05:11 PM Subject: Re: Guidance on the use of EntityUtils.consume That was the reason

Re: Guidance on the use of EntityUtils.consume

2011-12-06 Thread Oleg Kalnichevski
us.ibm.com > > > > > From: William Speirs > To: HttpClient User Discussion > Date: 12/06/2011 05:11 PM > Subject:Re: Guidance on the use of EntityUtils.consume > > > > That was the reason I posted the code... it is the same thing. > &

Re: Guidance on the use of EntityUtils.consume

2011-12-07 Thread Todd W Lainhart
-1250 > 1-978-899-4705 > 2-276-4705 (T/L) > lainh...@us.ibm.com > > > > > From: William Speirs > To: HttpClient User Discussion > Date: 12/06/2011 05:11 PM > Subject:Re: Guidance on the use of EntityUtils.consume > > > > That was the reas