0

I'm decoding some multi-part e-mail messages, and as part of the process I call this:

BASE64DecoderStream b64ds = (BASE64DecoderStream) part.getContent();

(part is an instance of javax.mail.Part)

I'm getting this error: java.lang.ClassCastException: com.sun.mail.util.BASE64DecoderStream cannot be cast to com.sun.mail.util.BASE64DecoderStream

Notice that the two classes are identical in the error. Why does the casting fail?

bradvido
  • 2,743
  • 7
  • 32
  • 49

1 Answers1

0

Try with,

BASE64DecoderStream b64ds = part.getContent();
Rakesh KR
  • 6,357
  • 5
  • 40
  • 55