日期:2014-05-17 浏览次数:20640 次
public boolean loadFile(String remoteFileName, String localFileName) {
boolean flag = true;
// 下载文件
BufferedOutputStream buffOut = null;
try {
buffOut = new BufferedOutputStream(new FileOutputStream(
localFileName));
flag = FtpClient.retrieveFile(remoteFileName, buffOut);
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (buffOut != null)
buffOut.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return flag;
}