简体   繁体   中英

Download/copy file from FTP server in Java

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM