users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: restrict Request.getEntityInputStream()?

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

On 13/12/11 15:13, Sergey Beryozkin wrote:
> 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 ?

I did not refer to MBRs by the way

> What will need to be done after it for the
> application code to get Book too ?
>
> Sergey
>
>>
>> Marek
>>
>>>
>>> Cheers, Sergey
>>>
>>>>
>>>> Bill
>>>>
>>>
>>>
>