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?