Hi I've been exploring the code source in order to know if it was interesting to add custom code to enable java.nio.file.Path in a, and I came across the classCode:MessageBuilder.withPayload(...).build().Code:FileTransferringMessageHandler
Looking at the code I was a surprised that the code don't use BufferedInputStream to read the file that will be transferred. That is quite suboptimalto transfer huge files. Plus it stresses the system / hardware.
At line 242 ofin Spring integration 2.2.0Code:org.springframework.integration.file.remote.handler.FileTransferringMessageHandler#sendFileToRemoteDirectory
And I've seen the same thing in other handlers of spring-integration-file, and in the current code of spring integration 3 on github.
Is there a reason for not using BufferedInputStream or maybe even BufferedOutputStream ?
Cheers,
Brice


Reply With Quote