dev@jsr311.java.net

Re: EntityProvider changes

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Sat, 18 Aug 2007 19:48:35 +1000

On 8/17/07, Marc Hadley <Marc.Hadley_at_sun.com> wrote:
>
> We'd like to suggest a couple of minor changes to EntityProvider:
>
> (i) Include mediaType as an explicit argument in the writeTo method.
> Currently an EntityProvider impl would have to go spelunking in the
> headers to work out what its supposed to be writing if it supports
> multiple media types.


Sounds good. +1

(ii) Make the mediaType arguments of readFrom and writeTo be of type
> MediaType rather than String.


Are there any annotations that refer to MediaType? Something like
@Accept("application/octet-stream")?

How would we configure such an annotation if MediaType were not a string (or
supported literal)?

Dhanji.