jbzhao
January 6th, 2000, 11:03 PM
Following is my code to get http package ?
Using read method of inputbufferStream
will block some time to return -1 which signaling
the end of the stream . but , actually , the package is already received minutes ago.
Is there any possible improvement can I make?
following is my code.
while(read!=-1)
{
read= in.read(buffer,0,cBufferSize-1);
if (read!=-1)saveToFile(buffer,0,read);
}
Thanks in advance for your kind help.
Using read method of inputbufferStream
will block some time to return -1 which signaling
the end of the stream . but , actually , the package is already received minutes ago.
Is there any possible improvement can I make?
following is my code.
while(read!=-1)
{
read= in.read(buffer,0,cBufferSize-1);
if (read!=-1)saveToFile(buffer,0,read);
}
Thanks in advance for your kind help.