Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.8k views
in Java FTP by
Hi everybody

Class FTPClient has the following methods: initSOCKS and initSOCKSAuthentication to support connecting ftp server through a pxoxy.
How about FileTransferClient ? :!:

6 Answers

0 votes
by (162k points)
Good question. No it doesn't have these methods. However they apply to the entire VM, so you can call the FTPClient methods and still use FileTransferClient.
0 votes
by
Thanks for advince, But I want to know more.Suppose
public class MyFTP extends FileTransferClient

If I want to use proxy in MyFTP, what should I do ?
Any advice will be appreciated.
0 votes
by (162k points)
You can still use the FTPClient methods and they will work for your subclass.
0 votes
by
hai!
I have just checked the source, the methods initSOCKS and initSOCKSAuthentication belong to FTPClient ,but the FTPClient member in class FileTransferClient is private ,not protocted.In class FileTransferClient we don't have a method like getFTPClient() through which we can get the FTPClient Object. I have added it myself. Also I advise you to add a method like this in your next edition or rewrite FileTransferClient not using FTPClient
0 votes
by (162k points)
These are static methods so you don't need an FTPClient instance.

Just call

FTPClient.initSOCKS(...)

etc
0 votes
by
I have got it after I read the source code
Any way,Thanks a lot!!

Categories

...