Downloading files with java, how to optimize bandwidth

Go To StackoverFlow.com

0

For networks that have a large load to carry, downloads can become gruesomely bandwidth consuming. Most downloading managers that I've seen let you choose the amount of bandwidth that you'd like to use. Is there a possible way to do this with Java programming? If so, how would it be accomplished?

  • More info: I already know how to download files, I just need an insight on bandwidth management. I am using HttpURLConnection to connect to the URL.
2012-04-04 01:08
by Anthony S.


1

Depending on the class/library being used to perform the network access, you may be able to override the function that performs the actual socket connection and change the code in order to (1) control how much is requested from the other side of the connection, (2) put in delays between requests, and/or (3) place limits on concurrent connections.

Without knowing specifics about what you're doing, it would be pretty hard to give more specific advise.

2012-04-04 01:15
by Ariel
To connect to the site I am using HttpURLConnection - Anthony S. 2012-04-04 01:26