You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tim Dudgeon <td...@gmail.com> on 2014/10/06 19:44:29 UTC

Writing Jetty response to stream.

I can see how to set the jetty response as text - just set the body to the
text.
But what if there is a large amount of data?
Don't want to build it into an in-memory String. Want to write it to a
stream.
How can I do this? I need to get a handle on an OutputStream that I can
write to?

Thx
Tim



--
View this message in context: http://camel.465427.n5.nabble.com/Writing-Jetty-response-to-stream-tp5757366.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Writing Jetty response to stream.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can set the body as a InputStream or if you want to load from a
file, then as a java.io.File etc.

On Mon, Oct 6, 2014 at 7:44 PM, Tim Dudgeon <td...@gmail.com> wrote:
> I can see how to set the jetty response as text - just set the body to the
> text.
> But what if there is a large amount of data?
> Don't want to build it into an in-memory String. Want to write it to a
> stream.
> How can I do this? I need to get a handle on an OutputStream that I can
> write to?
>
> Thx
> Tim
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Writing-Jetty-response-to-stream-tp5757366.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/