IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  getFile - Stream vs bytes

    Posted Wed September 05, 2012 02:52 PM

    I’m curious what’s the difference between using stream vs bytes. One thing I don’t like about stream is that if you forgot to close the stream, the file cannot be deleted manually without bouncing the Integration Server. So, does stream only makes sense when you’re working with large file?


    #webMethods
    #webMethods-Archive
    #If-it-doesn-t-fit-anywhere-else


  • 2.  RE: getFile - Stream vs bytes

    Posted Wed September 05, 2012 04:21 PM

    stream allows you to process large content with little memory footprint.
    If you only handle small files/docs, you can use bytes.


    #webMethods
    #webMethods-Archive
    #If-it-doesn-t-fit-anywhere-else


  • 3.  RE: getFile - Stream vs bytes

    Posted Wed September 05, 2012 04:28 PM

    Thanks tongwang for confirming my assumption. However, should best practice to use stream instead of bytes in case the client accidentally send you a large file by mistake? Again, I hate to use stream because you have to go the extra step to make sure the stream io gets close. Otherwise, you cannot delete the file unless the IS gets bounce.


    #If-it-doesn-t-fit-anywhere-else
    #webMethods-Archive
    #webMethods


  • 4.  RE: getFile - Stream vs bytes

    Posted Wed September 05, 2012 07:51 PM

    Yes as tongwang said streams deal with larget payloads and it’s always safe to use streams and close the io (standard practice) and dealing with smaller file chunks then bytes would suffix.

    HTH,
    RMG


    #If-it-doesn-t-fit-anywhere-else
    #webMethods
    #webMethods-Archive