Multiple HTTP Connections (Segmented/Swarm Downloa

2019-05-27 03:22发布

问题:

I'm currently working on creating a Download Manager for Android. In order to optimize the download I need to download the same file using multiple connections to the server. (ie. the same technique used in Internet Download Manager used in Windows.) The thing is I don't know how to create several HTTP connections and download the same file. I hope you can help me.. Thanks in advance!

回答1:

Spawn off a few threads which request part of the file via the Header Content-Range keyword. see Reading the first part of a file using HTTP