dev@jsr311.java.net

Re: JSR311: Fwd: JSR 311 Comments

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 30 May 2008 13:34:07 -0400

Marc Hadley wrote:
> Begin forwarded message:
>
>> From: Marc Hadley <Marc.Hadley_at_Sun.COM>
>> Date: May 30, 2008 10:18:32 AM EDT
>> To: Mikael Ståldal <mikael.staldal_at_univits.com>
>> Subject: Re: JSR 311 Comments
>>
>> Thanks for the comments, disposition below.
>>
>> On May 30, 2008, at 8:53 AM, Mikael Ståldal wrote:
>>
>>> * In javax.ws.rs.ext.MessageBodyWriter#getSize(), the parameter is
>>> specified as:
>>> "t - the type"
>>> shouldn't this instead be:
>>> "t - the instance to write."
>>>
>> Good catch, I'll fix this.
>>
>>>
>>> * Setion 4.3.4 says:
>>> An implementation MUST include pre-packaged MessageBodyReader and
>>> MessageBodyWriter im-
>>> plementations for the following Java and media type combinations:
>>> java.lang.String All text media types (text/*).
>>> java.io.InputStream All media types (*/*).
>>> java.io.Reader All media types (*/*).
>>> java.io.File All media types (*/*).
>>>
>>> How is MessageBodyReader to java.io.File supposed to work? Read to
>>> temporary file?
>>>
>> Exactly.
>>
>>> Why is java.lang.String only supported for text/* when java.io.Reader
>>> is supported for */*? It would be more consistent if both
>>> java.lang.String and java.io.Reader was supported for either text/*
>>> or */*.
>>>
>> Good question, I've created issue 41 to track this:
>>

In RESTEasy, we have a default String provider for */*.



-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com