Efficient way to download video or large file

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Efficient way to download video or large file

Postby arungupta2jan » Thu Oct 08, 2009 9:39 am

hi all,

i need to optimise the speed of a program which is downloading data from the web .
plz give me suggestion if any ...

how am i doing it?

1) i dont have any idea what is the length of the file..

Process 1
on downloading i create a connection to the server and start writing it to the ByteArrayOutputStream on completion i write it to the file..
here i am not sure whether the ByteArrayOutputStream will be able to keep the file of that size.
Process 2
on downloading i create a connection to the server and start writing it to the file directly
i feel like since there is lot of IO so it may be very slow

please help me out

regards
Arun Gupta
arungupta2jan
Developer
Developer
 
Posts: 28
Joined: Tue Jul 28, 2009 12:53 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests