hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <mbe...@gmail.com>
Subject Re: Limit size of file to be downloaded
Date Thu, 15 Sep 2005 23:08:10 GMT
The best way is to use getResponseBodyAsStream() and read only as many
bytes are you are willing to.  If the response ends up being too long,
call HttpMethod.abort().

Mike

On 9/15/05, Eugeny N Dzhurinsky <eugenydzh@jdevelop.com> wrote:
> Is there any way to limit size of file to be downloaded by HTTPClient in case
> if there is no content-length provided in HTTP response and file is something
> like 50Mb in size?
> 
> --
> Eugene N Dzhurinsky
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message