Returning an OutputStream that can be implemented by user : FileOutputStream, ObjectOutputStream, etc, ...

17 views
Skip to first unread message

Jason Mootoo

unread,
May 17, 2022, 1:26:42 AM5/17/22
to Smooks Development
Hello Everybody,

I would like to know if anybody has ever achieved results by returning an interface(Output Stream) with Smooks. I tried it with a small file and it worked, but then I tried it with a big file it failed. My concept is to take in an input stream and return back an output stream. Then a user can convert the output stream into an input stream and do whatever he wants to do with the stream, for instance, creating objects that can be pushed into a db.

Thank you for any potential input.

Best regards.

Jason.

Claude Mamo

unread,
May 17, 2022, 2:05:05 AM5/17/22
to smook...@googlegroups.com
Greetings Jason,

If you want to feed result from an output stream into an input stream then your best option might be to use a PipedOutputStream. I had blogged about this for Smooks 1.

Claude

--
You received this message because you are subscribed to the Google Groups "Smooks Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smooks-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smooks-dev/eb6c4772-4133-4be7-a89f-6b549f29e4dan%40googlegroups.com.

Claude

unread,
May 17, 2022, 2:12:40 AM5/17/22
to Smooks Development
Note that such questions should be posted in the Smooks user forum.

Claude

Jason Mootoo

unread,
May 17, 2022, 9:25:49 AM5/17/22
to Smooks Development
Hello Claude,

Thank you very much for you input.

I just consulted your blog.

Does the PipedOutputStream concept work when dealing with huge files ? 

Thanks for any further input.

Jason.

Jason Mootoo

unread,
May 17, 2022, 9:26:06 AM5/17/22
to Smooks Development
I take note Claude. :-) 
Reply all
Reply to author
Forward
0 new messages