On Mon, Jun 29, 2009 at 11:57 AM, Christophe MOURETTE (AKIO)<[email protected]> wrote: > On Mon, Jun 29, 2009 at 11:52 AM, Stefano Bagnara <[email protected]> wrote: > >> >> What mime4j version are you using? > > maven artefact 0;6 > >> >> How do you load the message stream? > > with this code : > IContentHandler handler = DefaultContentHandler.getInstance(); > MimeStreamParser parser = new MimeStreamParser(); > parser.setContentHandler(handler); > if (handler.containsCRLF(inputStream)){ > parser.parse(inputStream); > }else{ > parser.parse(new EOLConvertingInputStream(new > BufferedInputStream(inputStream))); > }
Okay, so you use your own ContentHandler implementation, DefaultContentHandler, right? Did you make sure to push back the first line of text that your implementation reads in it's containsCRLF() method? Besides, I don't think you have to make that distinction, Mime4j should be able to parse all kinds of eol styles automatically.. Markus
