Description
The _bufferSize member variable is reset in the __initDefaults() method. This method is called from the FTPClient's constructor, _connectAction, reinitialize, and disconnect. This can happen when the FTPClient is re-used after the remote server closes a session due to a timeout, for example.
If the bufferSize is set by the user via the setBufferSize() method, the value is lost when the buffer size is reset. Since the default buffer size controls the amount read from the input stream and written to the output stream, and is so low by default (1024B as defined by Util.DEFAULT_BUFFER_SIZE) the performance of FTPClient drops dramatically.
The recommendation would be to initialize __bufferSize to zero when it is declared and then remove the assignment in __initDefaults().