问题
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