createChildEntity (MIMEEntity - Java)

Creates a MIME entity and inserts it into the list of child MIME entities.

Note: This method is new with Release 6.

Defined in



public MIMEEntity createChildEntity( ) 
     throws NotesException
public MIMEEntity createChildEntity(MIMEEntity nextSibling) 
     throws NotesException


MIMEEntity nextSibling

An existing child of the calling MIME entity. If this parameter is specified, the new MIME entity is positioned ahead of it.

Return value


The child MIME entity.


A multipart MIME entity consists of parent and child entities. A parent can be a child. The child entities of a parent form a sequential list.

This method establishes the calling entity as a parent and the new entity as its child.

If the parent has no existing child entity, the new entity becomes the first child. If nextSibling is specified, this entity is placed ahead of it. Otherwise, this entity follows the last existing child entity.

If the parent's content type is "multipart," the existing content type/subtype is retained; otherwise, "multipart/mixed" is imposed. If the parent's content type is "multipart" and the "boundary" parameter is specified, the existing boundary is retained; otherwise, a boundary is generated. The exception is that a content type/subtype of "message/rfc822" is retained with no boundary.

The parent entity should contain no content. Any content is lost. You can include a preamble.