Posted By:
Stefan_Ritter
Posted On:
Tuesday, April 17, 2001 01:48 AM
I got regular e-mails from a mailing-list with the following mail-header: Content-type: text-plain; When calling MimeMessage.getContent() I get a NullPointerException, because of the semi-colon. A semi-colon means a charset should follow the content-type, for example something like: Content-type: text-plain; charset=usascii Here is the exception: java.lang.NullPointerException at sun.io.Converters.getConverterClass(Converters.java:78) at sun.io.Converters.newConverter(Converters.java:124) at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:67) at java.io.InputStreamReader. (I
More>>
I got regular e-mails from a mailing-list with the following mail-header:
Content-type: text-plain;
When calling MimeMessage.getContent() I get a NullPointerException, because of the semi-colon. A semi-colon means a charset should follow the content-type, for example something like:
Content-type: text-plain; charset=usascii
Here is the exception:
java.lang.NullPointerException
at
sun.io.Converters.getConverterClass(Converters.java:78)
at
sun.io.Converters.newConverter(Converters.java:124)
at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:67)
at
java.io.InputStreamReader.
(InputStreamReader.java:78)
at
com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
at
>javax.activation.DataHandler.getContent(DataHandler.java:511)
at
javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1259)
Any suggestions how I can solve this issue?
<<Less