hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Speirs <wspe...@apache.org>
Subject Re: How do you do multi-threaded/parallel/chunk downloading with HttpClient?
Date Sat, 31 Mar 2012 14:13:22 GMT
I think that these download accelerators work by opening multiple
connections to a site and perform byte-range fetching on blocks of the
file, then stitch it back together.

You could easily do this with HttpClient and a few threads. There are zero
copy writing to file examples on the website... I would start there and try
to modify that example.

Bill-
On Mar 31, 2012 4:13 AM, "tommmmmm" <tommmmmm@gmail.com> wrote:

> I was searching for some java API for multi-threaded downloading and I came
> across jdownman which heavily uses HttpClient. However that project is long
> gone and google doesn't return any other sane results, so I decided to ask
> here. How do you do multi-threaded/parallel/chunk downloading with
> HttpClient? To be precise: something as for example IDM does or Flashget
> does (or other so called download accelerators).
>
> I can easily download file with .copyUrlToFile function, however that is
> single-stream download. I would appreciate help on this. Either as with
> HttpClient itself or pointing me to some project/API that works ( I know
> jDownloader supports multi-threading downloading, but the code there is
> such a black magic to me and so complicated I can't figure heads and tails
> of it, so importing the jDownloader.jar won't do me any good...)
>
> Thank you for your help.
>
> Tom
>
>
> ps1: Please do not suggest (as at some `other` place) that most websites
> limit me to 1 connection so it's useless to write such project and you
> shouldn't want it. I fully understand which websites do allow more than 1
> connection and this project is to work with them delibarately.
> ps2: Installing aria2c is not an option (as any other software) because I
> do not have root access. I only have 'wget'.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message