users@jersey.java.net

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

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 22 Apr 2009 11:39:32 +0200

Hi,

What you present below should work, although i recommend utilizing:

   multiPart.getBodyParts().get(1).getEntityAs(InputStream.class);

The functionality to get access to the input stream is fundamental to
the higher-level operations with @FormDataParam. We have a number of
unit tests that would fail if the available content was zero.

How is the multipart message produced? using the Jersey client API?

Would it be possible to send a complete reproducible test case as a
maven project?

Paul.

On Apr 22, 2009, at 10:49 AM, Ari Heino wrote:

>
> Hi! Was wondering if the way to get java.io.InputStream from this
> Multipart
> has changed as well with tha move from JavaMail to MIMEPull library?
>
> Here's how i am getting InputStream from Multipart input:
>
> // get the second part which is the binary content
> BodyPartEntity bpe = (BodyPartEntity)
> multiPart.getBodyParts().get(1).getEntity();
> InputStream source = null;
>
> try {
> source = bpe.getInputStream();
>
> System.out.println("source.available(): " +
> source.available());
> }
>
> And since i changed to use MIMEPull liberary, the available content
> has
> always been zero?
> --
> View this message in context: http://n2.nabble.com/Multipart-1.0.3-not-finding-message-body-reader-tp2668407p2674972.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>