public interface Multipart extends Body
Modifier and Type | Method and Description |
---|---|
void |
addBodyPart(Entity bodyPart)
Adds a body part to the end of the list of body parts.
|
void |
addBodyPart(Entity bodyPart,
int index)
Inserts a body part at the specified position in the list of body parts.
|
java.util.List<Entity> |
getBodyParts()
Gets the list of body parts.
|
int |
getCount()
Returns the number of body parts.
|
java.lang.String |
getEpilogue()
Gets the epilogue or null if the message has no epilogue
|
java.lang.String |
getPreamble()
Gets the preamble or null if the message has no preamble.
|
java.lang.String |
getSubType()
Gets the multipart sub-type.
|
Entity |
removeBodyPart(int index)
Removes the body part at the specified position in the list of body
parts.
|
Entity |
replaceBodyPart(Entity bodyPart,
int index)
Replaces the body part at the specified position in the list of body
parts with the specified body part.
|
void |
setBodyParts(java.util.List<Entity> bodyParts)
Sets the list of body parts.
|
void |
setEpilogue(java.lang.String epilogue)
Sets the epilogue value, or remove it if the value passed is null.
|
void |
setPreamble(java.lang.String preamble)
Sets the preamble with a value or null to remove the preamble.
|
dispose
java.lang.String getSubType()
alternative
(the
default) or parallel
. See RFC 2045 for common sub-types
and their meaning.int getCount()
Entity
objects.java.util.List<Entity> getBodyParts()
Entity
objects.void setBodyParts(java.util.List<Entity> bodyParts)
bodyParts
- the new list of Entity
objects.void addBodyPart(Entity bodyPart)
bodyPart
- the body part.void addBodyPart(Entity bodyPart, int index)
bodyPart
- the body part.index
- index at which the specified body part is to be inserted.java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >
getCount()).Entity removeBodyPart(int index)
index
- index of the body part to be removed.java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getCount()).Entity replaceBodyPart(Entity bodyPart, int index)
bodyPart
- body part to be stored at the specified position.index
- index of body part to replace.java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getCount()).java.lang.String getPreamble()
void setPreamble(java.lang.String preamble)
preamble
- the preamble.java.lang.String getEpilogue()
void setEpilogue(java.lang.String epilogue)
epilogue
- the epilogue.