I'm trying to implement an FTP downloader that will allow me to list the files in the directory, and pass off all of the files that need downloading to multiple worker threads. In my google searches, this attracted me to edtFTPj/PRO, since it appears that the SecureFileTransferClient class can do this. However, I want to each file to download to a byte array, not to a file on the local filesystem, as I then need to process these files. They are generally smallish in size, and can fit in memory.
I then found AsyncFileTransferClient (Javadoc is amazing), which looks like I can do what I want with downloadByteArrayAsync() which, with the callback, looks exactly like what I want. Thanks!
I do have a question on AsyncFileTransferClient though. In the Javadoc for it, it shows using connectAsync(). Can I safely assume that I can simply call connect() instead, and have it use the normal blocking behavior and not return until it has successfully established the main FTP connection, as well as the created the worker threads? I can safely use all of the blocking methods of SecureFileTransferClient, such as directoryNameList(), and then simply use downloadByteArrayAsync() to download the files?
If I call AsyncFileTransferClient.changeDirectory(), will the directory change will be mirrored to the worker threads when I use downloadByteArrayAsync()? Or will I have to pass the full path name when using downloadByteArrayAsync()?
Last, I don't see a AsyncFileTransferClient.login() method. Does this mean I need to set AsyncFileTransferClient.getAdvancedSettings().setAutoLogin(true), or will it login automatically even if I don't set that?