O'Reilly logo

Java Enterprise in a Nutshell, Second Edition by David Flanagan, Jim Farley, William Crawford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Message

Synopsis

This is a class that models an email message. Protocol specific subclasses provide the actual implementations. Note that this class defines additional attributes beyond those included in the Part interface, including message recipients, senders, flags and subject.

Where supported by the underlying protocol, data will be read into the Message object as requested by the get methods, rather than when the Message is retrieved from the folder that contains it.

                  
public abstract class Message implements Part {
// Protected Constructors
   protected Message();  
   protected Message( javax.mail.Session session);  
   protected Message( Folder folder, int msgnum);  
// Inner Classes
   public static class RecipientType implements Serializable; 
// Property Accessor Methods (by property name)
   public abstract java.util.Enumeration getAllHeaders(          // Implements:Part
        ) throws MessagingException;  
   public Address[] getAllRecipients(
        ) throws MessagingException;  
   public abstract Object getContent(                            // Implements:Part
        ) throws IOExceptionMessagingException;  
   public abstract void setContent(                              // Implements:Part
        Multipart mp) throws MessagingException;  
   public abstract void setContent(Object obj,                   // Implements:Part
        String type) throws MessagingException;  
   public abstract String getContentType(                        // Implements:Part
        ) throws MessagingException;  
   public abstract javax.activation.DataHandler getDataHandler(  // ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required