File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Problem with FTPClient.retrieveFileStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Problem with FTPClient.retrieveFileStream" Watch "Problem with FTPClient.retrieveFileStream" New topic

Problem with FTPClient.retrieveFileStream

Gunja Mehrotra

Joined: Jul 17, 2008
Posts: 8
Hi,I have a copy function, in which I am using FTPClient.retrieveFileStream to get the InputStream from the file.Here when I give a small size text file it works fine, but I when I test with a real file to be used in my application that has a different extension and and size around 600-700 Kb it just hangs.i am not able to get if its a problem with the buffer size or so?

public void copyFile(String srcPath,String destPath) throws FTPException{
System.out.println("****** copyFile **********");
InputStream is = null;
// verify connection to ftp server


is = ftpClient.retrieveFileStream(srcPath);

}catch(IOException e)

if (is != null)
catch(IOException e)
I agree. Here's the link:
subject: Problem with FTPClient.retrieveFileStream
Similar Threads
creating a zip file
how to Unzip folder
Manipulating files on server
Multithreading client socket throws Stream corrupted exception
the encrypted file is cutted shortter