Hi,
I m facing some critical problem for downloading 5mb file from server. Does anyone know?
How to reduce the time to download file from server using HTTP connection?
Code I m using is
Thanks in advance.
Thanks,
Vikas Sawant.
I m facing some critical problem for downloading 5mb file from server. Does anyone know?
How to reduce the time to download file from server using HTTP connection?
Code I m using is
Code:
HttpConnection URLConn = (HttpConnection) Connector.open(originURL + fileName);
if (URLConn == null) {
URLConn.close();
return;
}
int length = (int) URLConn.getLength();
// variables to read the origin file
inputStream = URLConn.openInputStream();
try {
fileCon = (FileConnection) Connector.open(DEVICE_PATH + fileName, Connector.READ_WRITE);
if (!fileCon.exists()) {
fileCon.create();
}else{
fileCon.delete();
fileCon.create();
}
Thanks,
Vikas Sawant.
Comment