The app I’m working with uses FTPClient class from Apache Commons Net to connect and transfer files to a FTP server. I’m trying to establish if it’s doing that in a passive or active mode by default and I can’t see any references in the app’s code or in the library itself.
Any ideas?
Advertisement
Answer
The active mode is the default.
Documentation for FTPClient constructor says:
Default FTPClient constructor. Creates a new FTPClient instance with the data connection mode set to
ACTIVE_LOCAL_DATA_CONNECTION_MODE, the file type set toFTP.ASCII_FILE_TYPE, the file format set to FTP.NON_PRINT_TEXT_FORMAT , the file structure set toFTP.FILE_STRUCTURE, and the transfer mode set toFTP.STREAM_TRANSFER_MODE.