jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: restrict Request.getEntityInputStream()?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 13 Dec 2011 16:11:13 +0100

On Tue 13 Dec 2011 04:01:44 PM CET, Sergey Beryozkin wrote:
> Hi
> On 13/12/11 14:59, Bill Burke wrote:
>>
>>
>> On 12/13/11 9:48 AM, Marek Potociar wrote:
>>> Not sure we are on the same page. My question is, whether you think
>>> that (on the server side) the following 2 methods
>>> are interchangeable:
>>>
>>> request.getEntity(InputStream.class);
>>> request.getEntityInputStream();
>>>
>>
>> No we weren't on the same page :) Thanks for clarifying.
>>
>> Yes, you're right, they are interchangeable. So, yes,
>> getEntityInputStream() isn't needed.
>
> Will
>
> request.getEntity(Book.class);
>
> work ?

Assuming there is a readable (e.g. in terms of applicable
MessageBodyReader) Book representation in the entity, the above should,
of course, work.

Marek

>
> Cheers, Sergey
>
>>
>> Bill
>>
>
>