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

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

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 13 Dec 2011 15:13:31 +0000

On 13/12/11 15:11, Marek Potociar wrote:
>
>
> 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.

And do we really want to let it happen, to get the input stream consumed
by custom providers ? What will need to be done after it for the
application code to get Book too ?

Sergey

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