My mistake. Thanks for pointing it out. It works fine now.
Regards,
Aegir
Roland Weber wrote:
Hello Aegir,
byte buffer[] = new byte[1024];
while ( input.read(buffer) != -1) {
out.write(buffer);
}
You know, the download file for http://www.sf.net/index.php is much
larger than the real target file.
Can anybody tell me what happened? And how to solve this problem?
Thanks.
In each iteration, you save the whole buffer even if only a few bytes
have been read into it. You might have noticed this yourself by having
a look at the contents of the file you created.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]