0

I am using apache commons-io FileUtils 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
  • 1,982
  • 2
  • 24
  • 54

1 Answers1

0

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.

jay
  • 1,982
  • 2
  • 24
  • 54