how to implement FTP using java?

2019-06-22 00:43发布

问题:

I am working with FTP.......i have to embedd a msg to a image file at client side and i have to send it to the server....on the server side i have to retrieve the image file and then i will retrieve the message. I have completed the embedding the message and retrieve the message using cryptography and steganography techniques. I am loking for how can i transfer that file from client to server.....i have to work with FTP.....how can use FTP successfully to transfer a file from client to server and retrieve it on server side?

回答1:

You can use apache commons FTPClient. They have a good example on that page.



回答2:

To add to CoolBeans answer, there are a number of existing packages that handles ftp. Implementing it yourself is not a good idea. My personal favourite is ftp4j.