Methods Summary |
---|
public Message | getMessage()Return the Message that contains the content.
Follows the parent chain up through containing Multipart
objects until it comes to a Message object, or null.
try {
return getMessage(part);
} catch (MessagingException ex) {
return null;
}
|
private static Message | getMessage(javax.mail.Part p)Return the Message containing an arbitrary Part.
Follows the parent chain up through containing Multipart
objects until it comes to a Message object, or null.
while (p != null) {
if (p instanceof Message)
return (Message)p;
BodyPart bp = (BodyPart)p;
Multipart mp = bp.getParent();
if (mp == null) // MimeBodyPart might not be in a MimeMultipart
return null;
p = mp.getParent();
}
return null;
|
public javax.mail.Part | getPart()Return the Part that contains the content.
return part;
|
public javax.mail.Session | getSession()Return the Session we're operating in.
Message msg = getMessage();
return msg != null ? msg.session : null;
|