Results 1 to 3 of 3

Thread: Is there a reason why FileTransferringMessageHandler is not using BufferedInputStream

  1. #1
    Join Date
    Aug 2008
    Posts
    6

    Default Is there a reason why FileTransferringMessageHandler is not using BufferedInputStream

    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
    Code:
    MessageBuilder.withPayload(...).build()
    , and I came across the class
    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 of
    Code:
    org.springframework.integration.file.remote.handler.FileTransferringMessageHandler#sendFileToRemoteDirectory
    in Spring integration 2.2.0

    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

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,020

    Default

    You raise a good point. Please open an 'Improvement' JIRA issue...

    https://jira.springsource.org/browse/INT

    We would encourage you to make a contribution, please see: https://github.com/SpringSource/spri...ONTRIBUTING.md
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Aug 2008
    Posts
    6

    Default

    Done there : https://jira.springsource.org/browse/INT-2953
    I'll see about the contribution later; I'm not sure how I can prove in a test that the code uses a BufferedInputStream however.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •