hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Http Get retrieve data larger than Integer.MAX_VALUE
Date Mon, 28 Jan 2013 22:47:15 GMT
On Mon, 2013-01-28 at 23:42 +0100, Olivier Lamy wrote:
> Hi,
> Is there any way to retrieve a file which is larger than Integer.MAX_VALUE ?
> ContentLengthInputStream has a cast which can be bigger than Integer.MAX_VALUE
> 
> if (pos + len > contentLength) {
>   len = (int) (contentLength - pos);
> }
> 
> Thanks,
> --
> Olivier Lamy

Olivier

This applies to one read operation only (unless I am missing something).
I believe byte arrays in Java physically cannot be larger than
Integer.MAX_VALUE. One can read content entities larger than
Integer.MAX_VALUE in multiple chunks, though.

Oleg



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


Mime
View raw message