MIMEEntity (Java™)
Represents an item of type MIME (Multipurpose Internet Mail Extensions).
Syntax
public class MIMEEntity extends Base
Containment
Contains: MIMEHeader
Properties
BoundaryEnd through getBoundaryEnd
BoundaryStart through getBoundaryStart
Charset through getCharset
ContentAsText through getContentAsText
ContentSubtype through getContentSubType
ContentType through getContentType
Encoding through getEncoding
Headers through getHeaders
HeaderObjects through getHeaderObjects
InputSource through getInputSource
InputStream through getInputStream
Preamble through getPreamble and setPreamble
Reader through getReader
Methods
parseXML
recycle
transformXML
Access
To access the MIME content of a NotesDocument:
- First call Session.setConvertMIME(false) to override normal conversion of MIME items to rich text.
- Then call Document.getMIMEEntity.
- Or call Document.getFirstItem followed by Item.getMIMEEntity.
- To create an item in MIME format, call Document.createMIMEEntity.
- Before exiting your code, call Session.setConvertMIME(true) (or restore the original setting).
Usage
A valid MIMEEntity object becomes invalid if any of the following methods are applied to the containing Document object: computeWithForm, encrypt, save, send, or sign, or closeMIMEEntities in NotesDocument.
Avoid processing items as both Item and MIMEEntity objects concurrently. Once you start using MIMEEntity properties and methods, do not use other methods that access items in the same document until you terminate MIME processing with computeWithForm, encrypt, save, send, or sign, or closeMIMEEntities in NotesDocument.
An item named $NoteHasNativeMIME with a value of "1" indicates that the document contains a MIME entity. An item of type "MIME part" contains the body of the MIME entity; in mail messages this is typically the item named "Body." For a multipart MIME entity, the document has multiple "MIME part" items, one for each parent and child entity. The "MIME part" item contains headers such as "Content-Type" and "Content-Transfer-Encoding," the preamble (parent entities), and body content (child and stand-alone entities). In a mail message, certain items correspond to MIME headers, for example, Subject ("Subject" header), SendTo ("To" header), and Received ("Received" header).
The MIMEEntity and MIMEHeader classes collect and organize the MIME information from a document. One MIMEEntity object represents a document containing a MIME entity that is not multipart. Multiple MIMEEntity objects represent a document containing a MIME entity that is multipart. A multipart MIME entity consists of multiple parent and child entities. A child entity can also be a parent.