Hi, All

I tried the following code and it hangs (would not
return waiting for
timeout)
if (!ftp.storeFile(theFile, fis))
        out.print("FTP " + theFile + " failed");


But the following works:

int bufferSize = ftp.getBufferSize();
byte buf[] = new byte[bufferSize];
while (fis.read(buf) != -1) {
                fos.write(buf);
   }

The 2nd code works most of the time, but some times
the server file it
write is not exactly the same as the source (local
file). I called
ftp.setFileType(FTPClient.BINARY_FILE_TYPE); before
trying to write on
server.

I need to fixes this and comments are welcome.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to