You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by Florent Georges <li...@fgeorges.org> on 2009/12/23 16:05:30 UTC
Parsing a multipart stream, without its headers
Hi,
I've just discovered mime4j. I've looked for an answer in the
website, but maybe I'm just asking for the obvious, sorry about
that.
I have a stream that represents the content of a multipart.
But the headers already have been consumed by the system. In
particular, the Content-Type header is not there anymore. So
when I use a MimeStreamParser, it does not recognize it as a
multipart, parses the headers of the first part, and tries to
analyze the whole stream using the Content-Type of the first part
(for instance text/html).
Is there any way to parse such a stream, by providing the
already-parsed headers programmatically to the MIME stream
parser?
Regards,
--
Florent Georges
http://www.fgeorges.org/
Re: Parsing a multipart stream, without its headers
Posted by Florent Georges <li...@fgeorges.org>.
Florent Georges wrote:
Hi,
> Is there any way to parse such a stream, by providing the
> already-parsed headers programmatically to the MIME stream
> parser?
It seems I can use MimeTokenStream.parseHeadless() fot this
exact purpose, so I rewrote the message parsing to use a token
stream instead of a stream parser.
Just out of curiosity, is there any reason why there is no
equivalent on the MimeStreamParser class?
Regards,
--
Florent Georges
http://www.fgeorges.org/