users@jersey.java.net

Re: [Jersey] Multipart 1.0.3 not finding message body reader

From: Ari Heino <ext.ari.heino_at_tieto.com>
Date: Tue, 2 Jun 2009 04:28:35 -0700 (PDT)

Paul Sandoz wrote:
>
>
> On Apr 22, 2009, at 3:55 PM, Ari Heino wrote:
>
>>
>> Thanks, that fixed it.
>>
>> I quess with JavaMail library the source.available() returned the
>> buffer
>> length still and that's why i didn't notice to change the reading
>> style of
>> the stream.
>>
>> Cheers :)
>>
>>
>
> Great!
>
> Paul.
>
>

New (or continue of) issue with this byte [] handlling of input. with very
large files or many concurrent files, java heap space fills up and causes
OutOfMemoryError.

This seems to be because all the bytes are actually read into memory with
this

byte[] bytes = multiPart.getBodyParts().get(1).getEntityAs(byte[].class);

Is there a ways to "go around" this reading into memory part while using
MimePull library? What i'm doing with inputstream is saving it into database
via JPA/EclipseLink.

-- 
View this message in context: http://n2.nabble.com/Multipart-1.0.3-not-finding-message-body-reader-tp2668407p3011538.html
Sent from the Jersey mailing list archive at Nabble.com.