users@jersey.java.net

Re: [Jersey] Streaming Output

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Thu, 29 Jul 2010 14:42:53 +0200

On Jul 28, 2010, at 3:22 PM, Herak Sen wrote:

> Hi All,
>
> What is the best way to stream output using Jersey?
> e.g. A resource generating multiple media type such as pdf, xls etc.
>

You can use an instance of StreamingOutput [1] for the entity, which
may be easier than developing your own MessageBodyWriter.

Paul.

[1] https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/core/StreamingOutput.html