If your existing edtFTPj code is as follows:
FTPClient ftp = new FTPClient(address);
then you may replace it by the following:
SSLFTPClient ftp = new SSLFTPClient(address, flags);
ftp.loadRootCertificates(rootCertFileName);
ftp.connect();
and it should work exactly the same. For fully standard compliant FTPS servers, the
flags argument may be set to 0. If you find that the client hangs then try using the
DISABLE_SSL_CLOSURE flag. The
rootCertFileName is the path to the root certificate file. This file should contain the server certificate (or that of the CA which issued it). It is recommended that you use server authentication, but if you're sure you don't need it (e.g. if you're not using the secure FTP feature) then you can do the following:
SSLFTPClient ftp = new SSLFTPClient(address, flags);
ftp.setValidateServer(false);
ftp.connect();
which will turn off server validation (it is on by default).
In either case, the client operates as a normal FTP client until you call the auth() method.
To summarize, you must first call either
loadRootCertificates() or
setValidateServer(), and then you must call the
connect() method. Other than that everything should work exactly the same as the non-SSL client.