|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vordel.mime.Body com.vordel.mime.CompoundBody
public abstract class CompoundBody
A compound body is an abstract class representing a Body type that is used
to container other Body
s. MIME Multipart messages are CompoundBody
s,
as are Dime messages.
Multipart
Field Summary | |
---|---|
protected java.lang.String |
rootPartId
|
Fields inherited from class com.vordel.mime.Body |
---|
CAN_INVALIDATE, contentType, CT_APP_OCTET_STREAM, CT_DEFAULT, CT_MULTIPART_RELATED, CT_TEXT_PLAIN, CT_TEXT_XML_UTF8, CT_XOP_APPLICATION_XML, headers, PUSH_WRITE, REMOVE_XFER_ENCODING_ON_WRITE, RETAIN_XFER_ENCODING_ON_READ |
Constructor Summary | |
---|---|
CompoundBody(HeaderSet headers,
ContentType ct)
|
Method Summary | |
---|---|
void |
addPart(Body part)
|
void |
addPart(java.lang.String id,
Body part)
Add a body part to this compound body, identified by "Id" |
void |
clear()
Remove all parts of this compound body. |
Body |
getPart(java.lang.String id)
Get a constituent body part by its ID |
java.lang.Iterable<Body> |
getParts()
Get an iterator over all parts in this CompoundBody. |
java.util.Set<java.util.Map.Entry<java.lang.String,Body>> |
getPartsById()
Return an Iterator over Set of Map.Entry objects, keyed by Content ID, with values of Body objects for each ID. |
java.util.Map<java.lang.String,Body> |
getPartsByIdMap()
Return an Iterator over Set of Map.Entry objects, keyed by Content ID, with values of Body objects for each ID. |
int |
getPartsCount()
Get the "start" For this message |
Body |
getStartPart()
Get the "start" For this message |
void |
purgeContent()
Purge a compound body. |
boolean |
removePart(Body body)
Remove a body part |
boolean |
removePart(java.lang.String id)
Remove a body part based on its Content-ID |
void |
replacePart(Body oldB,
Body newB)
|
void |
setStartPartID(java.lang.String startPartID)
Set the ID of the part considered the "starting point" |
Methods inherited from class com.vordel.mime.Body |
---|
bufferInput, contentAvailable, create, dispose, fini, getContentEncoding, getContentId, getContentLength, getContentType, getHeaders, getInputStream, getParent, getSource, initSource, parse, parse, registerFactory, setParent, write, writeContent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String rootPartId
Constructor Detail |
---|
public CompoundBody(HeaderSet headers, ContentType ct)
Method Detail |
---|
public void setStartPartID(java.lang.String startPartID)
startPartID
- a string ID for the constituent bodypart.public Body getPart(java.lang.String id) throws java.io.IOException
java.io.IOException
public boolean removePart(java.lang.String id) throws java.io.IOException
id
- The content-id of the body part to remove.
java.io.IOException
public boolean removePart(Body body) throws java.io.IOException
part
- The body part to remove.
java.io.IOException
public Body getStartPart() throws java.io.IOException
java.io.IOException
public int getPartsCount() throws java.io.IOException
java.io.IOException
public java.lang.Iterable<Body> getParts() throws java.io.IOException
java.io.IOException
public java.util.Set<java.util.Map.Entry<java.lang.String,Body>> getPartsById() throws java.io.IOException
Any parts that do not have a Content-Id will be assigned one
java.io.IOException
public java.util.Map<java.lang.String,Body> getPartsByIdMap() throws java.io.IOException
Any parts that do not have a Content-Id will be assigned one
java.io.IOException
public void addPart(Body part)
public void addPart(java.lang.String id, Body part) throws java.io.IOException
id
- the ID of the new bodypartpart
- the new bodypart
java.io.IOException
public void purgeContent()
This method implements the interface from Body
by iterating over
all its constituent bodyparts, and purging those in turn.
purgeContent
in class Body
public void clear()
public void replacePart(Body oldB, Body newB) throws java.io.IOException
java.io.IOException
|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |