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
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;
}
(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
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:
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
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.
>
&
-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