Download/copy file from FTP server in Java

橙三吉。 提交于 2019-12-11 23:16:36

问题


I am trying to make an FTP client from scratch in Java and so far I can connect to the FTP server. Im not allowed to use Apache to download a file, so my question is: how do I download a file from a remote FTP-server? I've now spent the last 2 days trying to find a guide but it seems impossible to find one which does not require Apache.

Any help is appreciated, thank you.


回答1:


You can do this quite straightforward with an URLConnection. An example is outlined in this post.



来源:https://stackoverflow.com/questions/29542498/download-copy-file-from-ftp-server-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!