james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: Stream-based MIME Parser
Date Wed, 03 Mar 2004 17:17:44 GMT
Joe Cheng wrote:
>  >> What I believe we want is code that reads through the MIME content 
> as a stream and issues callbacks for each header and part. For a part 
> (counting the entire message as a part), I'd like to be able to get the 
> raw stream and just read on it until the end of that scope. From that, 
> we can do a lot. <<
> 
> Noel, did you ever find a solution for this?  I could use the same for 
> my IMAP project and am thinking about writing it if you haven't found 
> anything usable.  From what I've seen, it seems like MIME parsers should 
> be really easy to write--except that many MIME producers seem not to 
> follow the spec.  (Danny, any tips?)

I know people aren't thrilled with the JavaMail parser, but the one 
thing it does very very well (meaning it takes a lot of effort) is spec 
implementation.

The API is not perfect, but really we just could use a 
lazy-instantiating version of javax.mail.internet.MimeMultipart, and 
we'd have IMHO the best of both worlds.  Continue to use the same 
familiar API and avoid loading the whole message into memory.  I'm 
pretty sure we can just register with JavaMail to use a different 
parser, and then whenever it does hit a multipart type, it could use our 
parser code.

Anyway, just a random thought.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message