java 如何使用java从ftp服务器下载文件到本地机器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15563658/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to download a file from ftp server to local machine using java
提问by kgopi
I want to download a zip file from FTP server to my local machine.
我想从 FTP 服务器下载一个 zip 文件到我的本地机器。
And that .zip file folder structure is like a\b\c\d.zip.
那个 .zip 文件文件夹结构就像a\b\c\d.zip。
Please help me to do that
请帮我做到这一点
Thanks in advance.
提前致谢。
回答by Jabir
The following post/blog/link explains how to download file using Apache Commons Net
以下帖子/博客/链接解释了如何使用 Apache Commons Net 下载文件
http://www.mysamplecode.com/2012/03/apache-commons-ftpclient-java-example_16.html
http://www.mysamplecode.com/2012/03/apache-commons-ftpclient-java-example_16.html
http://www.dreamincode.net/forums/topic/32031-ftp-in-java-using-apache-commons-net/
http://www.dreamincode.net/forums/topic/32031-ftp-in-java-using-apache-commons-net/
Hope it helps.
希望能帮助到你。