users@jersey.java.net

Re: Returning an InputStream from a _at_GET method?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 29 Feb 2008 11:42:59 +0100

Gabor Szokoli wrote:
> Hi there,
>
> One of my resources is produced in XML format by an external application.
> I can of course extract the String from the InputStream and return
> that from my @GET method, just seems wasteful.
>
> I was wondering how common this situation could be, may be worth optimising?
>

Returning InputStream is supported:

   @GET public InputStream get() {
     InputStream in = ...
     return in;
   }

Paul.

>
> Gabor Szokoli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109