On 6/5/05, Joe Cheng <[EMAIL PROTECTED]> wrote:
> To use mime4j's DOM-like mode, you just use new Message(InputStream) to
> create a message, then call methods on it.  I can't be more specific
> about the methods it offers, as I haven't used it much--this is Niklas'
> area of expertise.
> 
> I'm currently working on getting the latter mode to work without using
> temp files, when possible.  The header parser is also missing the
> ability to parse trace (i.e. return-path, received) and message-id
> fields.  Other than that, mime4j is ready to use (and in fact has been
> in use in at least two production apps for several months).  So far it
> has proven completely robust for everyone who has tried it AFAIK.

I would strongly suggest implementing something with segments instead
of DOM.  To see what I mean, take a look at
http://jerichohtml.sourceforge.net/.  It gives you roughly a DOM-style
to access and modify an HTML document.  But when you rebuild the
modified HTML, it assembles the content by merging the existing raw
stream content with whatever you've changed.

In comparison, building a stream from a DOM means you are converting
all your object representations back into streams.  This has the
downside of a) additional processing time b) possible changes to parts
you didn't modify.  This b) part is key to me since (as with HTML)
mime can have badly formatted parts that I would prefer we could just
ignore and leave alone if we didn't touch it.

Anyway, that's my 2 cents.  Again, strongly suggest checking out how
Jericho does this stuff and looking forward to seeing what you come up
with.

-- 
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to