Stefano Bagnara wrote:

  Hi,

> >  I am using a MimeTokenStream to parse a multipart message.
> > For bodies with textual content (for instance text/plain), I
> > get a Reader object from MimeTokenStream.getReader().
> > Unfortunately, it seems to not convert \r\n (correct end of
> > line in messages on the wire) to \n (correct end of line in
> > Java strings).

> Why do you think \n is the correct end of line in Java
> strings ?  This is platform dependant and there is no such
> thing as the "correct end of line in java strings".

  Mmh...  It seems you are right.  I've always thought that one
of the differences between byte and character streams was the
en-/de-coding of the platform dependent end of line to the
canonical form '\n'.  It seems I was wrong, and ends of line
seems to be never decoded by a Reader (except by BufferedReader
but that's not really the same thing).

  I guess this is a legacy of my C and C++ experiences :-/

> Hope you got it,

  Yup.  I've even learned something today :-)  Thanks for the
explanation, and sorry for the noise, regards,

-- 
Florent Georges
http://www.fgeorges.org/























Reply via email to