commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Payam Fard <p_fard_2...@yahoo.com>
Subject Question regarding FTPClient.retrieve
Date Mon, 16 Jul 2007 18:37:55 GMT
I am using FTPClient class and would like to download
a file from an FTP site. Here is what I am doing, but
I cannot get it to download the file. Any help would
be appreciated:

ftp.connect(myHostname); 

ftp.login(myUsername, myPassword);

File localFile = new File("C:\\test\\test.csv");

FileOutputStream outStream = new
FileOutputStream(localFile.getAbsoluteFile());

boolean result = ftp.retrieveFile(remoteFilename,
outStream); 

ftp.disconnect();


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message