Hello Everybody
I am trying to make an application (security software)..in this software I want to get image from a remote server..The code which I have written for this application is very simple...using sockets API....
*********************************************************
public void run()
{
try{
image_size = 10063; //dummy value in bytes
byte pBuff[] = new byte[image_size];
byte temp;
int i=0;
while (i<image_size) {
temp = (byte) is.read(); //"is" is an InputStream Object
pBuff[i] = temp;
i++;
}
} catch(IOException ioe){
}
}
*********************************************************
I have checked the above code on JBuilder2005 Simulator...but the problem I am facing that it takes a long to download a file even the file size is only 10kb and I am not checking it in real enviornment...as server is also present on the same computer on which this software is running...and i thinmk that it will be more slow in real enviornment....If anybody have any knowledge about that...that how a WAP browser download an Image...or any best technique to download the image....or the above technique is best.....please help me as I am facing very much difficulties...
Thanks
Bye...

Reply With Quote

