Apache Camel SFTP implementation uses JSch. But JSch supports only binary file transfer, as I understand from this link:
How to set file type and file transfer mode in JSch?
Then how does Camel SFTP support binary
as an URI parameter?
https://camel.apache.org/components/latest/sftp-component.html
Is my understanding wrong?
The documentation is most likely false.
Both the FtpEndpointConfigurer
and the SftpEndpointConfigurer
indeed propagate the binary
parameter to FtpConfiguration.setBinary
and SftpConfiguration.setBinary
respectively. So in that sense, both support that parameter.
But while FtpOperations
queries FtpConfiguration.isBinary
and sets FtpClient
mode accordingly:
client.setFileType(configuration.isBinary() ? FTP.BINARY_FILE_TYPE : FTP.ASCII_FILE_TYPE);
... the SftpConfiguration.isBinary
is never called. So the configured value is never used.