【发布时间】:2014-08-05 17:08:52
【问题描述】:
我正在尝试使用 org.apache.commons 从 Java 上的 FTP 下载文件。
try {
OutputStream os = new FileOutputStream(downloadedFile);
boolean success = this.client.retrieveFile(from, os);
System.out.println("File transfer status is "+ Boolean.toString(success));
os.close();
} catch (IOException e) {
System.err.println(e.getMessage());
}
文件正在下载,但有些图像有错误,如 Invalid image,另一个看起来像这样 https://www.dropbox.com/s/faozfxzag5xrk5z/Screenshot_3.png
有什么想法吗?谢谢
【问题讨论】:
标签: java ftp download apache-commons-net