jay jay - 1 year ago 156
Android Question

FileUtils.copyURLToFile not working with low internet speeds

I am using apache commons-io

for downloading a file into android device from given url.

FileUtils.copyURLToFile(new URL(urlString), tempFolderFile)

This works very well under normal internet speeds, but does not work at all under 2G internet speed (1kB/sec).

Is this a limitation with apache commons-io library or is there a way to achieve download with this library ?

jay jay
Answer Source

Buffersize will not impact much. It should be maintained within safe limit, library will take care of it. 2G internet speeds vary from 10-20 kbps. Make sure timeout is sufficiently high to download the file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download