Simple SFTP-to-File integrations with charset conversion like:
fails to output a file in /tmp/samples-camel/SftpToFileTest/out/ correctly. Depending on the combinations, it sometimes converts the charset wrongly and sometimes it simply doesn't output a file to the target dir.
The root cause is that SftpOperations puts ByteArrayOutputStream instead of byte or InputStream to the exchange file body when retrieving a file:
which then results in no converter from OutputStream to java.io.Reader being found in GenericFileConverter downstream, and thus the File producer handles a RemoteFile awkwardly when outputting a file.