Exchange exchangeCosumer = consumer.receive(sourceFtp, 120000); fileObj = exchangeCosumer.getIn().getBody(GenericFile.class);
String content = GenericFileConverter.genericFileToString(fileObj, exchange);
camel - read file content via consumer template
最新推荐文章于 2021-06-29 19:47:58 发布
本文介绍了一种通过Exchange从sourceFtp接收文件并将其转换为字符串的方法。利用consumer.receive方法设置超时时间来获取文件,然后使用GenericFileConverter将接收到的文件对象转换成字符串形式。
3108

被折叠的 条评论
为什么被折叠?



