users@jersey.java.net

Re: [Jersey] Sending binary files over multipart/mixed

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Mon, 24 Nov 2008 13:06:39 -0800 (PST)

        So more specifically, what happens if I use jersey-multipart
out-of-the-box? What transfer encoding does it default to? How can I
make sure that unencoded binary is sent under the hood?

PS: It might be worth noting that jersey-multipart is based on top of
JavaMail whose defaults (probably favoring backwards compatibility for
emails) might not be the defaults we want to adopt for JAX-RS.

Gili

Tatu Saloranta (via Nabble) wrote:
> --- On Mon, 11/24/08, Gili <cowwoc@...
> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1573736&i=0>>
> wrote:
>
> > From: Gili <cowwoc@...
> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1573736&i=1>>
> > Subject: [Jersey] Sending binary files over multipart/mixed
> > To: users@...
> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1573736&i=2>
> > Date: Monday, November 24, 2008, 1:44 PM
> > Hi,
> >
> > I was under the impression that multipart/mixed used MIME and MIME
> allowed
> > transparent transfer of binary data (versus say XML). Then
> > today I ran across http://www.pcnineoneone.com/howto/ftp1.html which
> > says "your file is encoded as text in the data stream, and converted
> back to
> > binary on your end. The encoding adds considerable overhead to the
> > transmission."
> >
> > Huh? It sounds to me like he's implying that MIME requires base64
> encoding.
> > So who is right? Does MIME transfer binary data with or without
> encoding?
>
> As far as I understand, it is possible to do either: traditionally
> base64 encoded content is used (for assumed need to be 7-bit
> compatible), but it is also possible to include inlined non-encoded
> binary content. See http://en.wikipedia.org/wiki/MIME for more info,
> esp. comments about soap/MTOM use cases being different from email usage
> of MIME.
> There are some complications wrt. doing latter, but it should be doable,
> and lots of effort seems to be spent on that within XML/Soap/MTOM
> community.
>
> As to whether MIME multi-part approach is required for efficient binary
> support (compared to inlined base64-encoded content for xml or json), I
> think jury is still out. I believe latter can be made efficient enough
> too (and if anyone is interested in details feel free to follow up wrt.
> my work with Woodstox 4.0 -- but that's getting bit OT)
>
> -+ Tatu +-
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1573736&i=3>
> For additional commands, e-mail: users-help@...
> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1573736&i=4>
>
>
>
> ------------------------------------------------------------------------
> This email is a reply to your post @
> http://n2.nabble.com/Sending-binary-files-over-multipart-mixed-tp1573660p1573736.html
> You can reply by email or by visting the link above.
>

-- 
View this message in context: http://n2.nabble.com/Sending-binary-files-over-multipart-mixed-tp1573660p1573758.html
Sent from the Jersey mailing list archive at Nabble.com.