This class represents a MIME style email message. It implements the Message abstract class and the MimePart interface. Clients wanting to create new MIME style messages will instantiate an empty MimeMessage object and then fill it with appropriate attributes and conten
| 82 | */ |
| 83 | |
| 84 | public class MimeMessage extends Message implements MimePart { |
| 85 | |
| 86 | /** |
| 87 | * The DataHandler object representing this Message's content. |
| 88 | */ |
| 89 | protected DataHandler dh; |
| 90 | |
| 91 | /** |
| 92 | * Byte array that holds the bytes of this Message's content. |
| 93 | */ |
| 94 | protected byte[] content; |
| 95 | |
| 96 | /** |
| 97 | * If the data for this message was supplied by an |
| 98 | * InputStream that implements the SharedInputStream interface, |
| 99 | * <code>contentStream</code> is another such stream representing |
| 100 | * the content of this message. In this case, <code>content</code> |
| 101 | * will be null. |
| 102 | * |
| 103 | * @since JavaMail 1.2 |
| 104 | */ |
| 105 | protected InputStream contentStream; |
| 106 | |
| 107 | /** |
| 108 | * The InternetHeaders object that stores the header |
| 109 | * of this message. |
| 110 | */ |
| 111 | protected InternetHeaders headers; |
| 112 | |
| 113 | /** |
| 114 | * The Flags for this message. |
| 115 | */ |
| 116 | protected Flags flags; |
| 117 | |
| 118 | /** |
| 119 | * A flag indicating whether the message has been modified. |
| 120 | * If the message has not been modified, any data in the |
| 121 | * <code>content</code> array is assumed to be valid and is used |
| 122 | * directly in the <code>writeTo</code> method. This flag is |
| 123 | * set to true when an empty message is created or when the |
| 124 | * <code>saveChanges</code> method is called. |
| 125 | * |
| 126 | * @since JavaMail 1.2 |
| 127 | */ |
| 128 | protected boolean modified = false; |
| 129 | |
| 130 | /** |
| 131 | * Does the <code>saveChanges</code> method need to be called on |
| 132 | * this message? This flag is set to false by the public constructor |
| 133 | * and set to true by the <code>saveChanges</code> method. The |
| 134 | * <code>writeTo</code> method checks this flag and calls the |
| 135 | * <code>saveChanges</code> method as necessary. This avoids the |
| 136 | * common mistake of forgetting to call the <code>saveChanges</code> |
| 137 | * method on a newly constructed message. |
| 138 | * |
| 139 | * @since JavaMail 1.2 |
| 140 | */ |
| 141 | protected boolean saved = false; |
nothing calls this directly
no outgoing calls
no test coverage detected