|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.blackberry.api.mail.Multipart
A container that holds multiple BodyParts.
Multipart provides methods to retrieve and set its subparts.
BodyPart,
Part| Field Summary | ||
|
protected String |
_contentType
Content-type of this multipart object. |
|
protected Part |
_parent
Part that contains this Multipart, if known. |
|
protected Vector |
_parts
Vector of BodyPart objects. |
| Constructor Summary | ||
|
|
Multipart()
Default constructor - applies a type of multipart/mixed to the object |
|
protected |
Multipart(Part parent)
Constructor with parent part and default TYPE of multipart/mixed. |
|
|
Multipart(String type)
Creates a Multipart with the specified type. |
|
protected |
Multipart(String type,
Part parent)
Constructor with parent Part.
|
| Method Summary | ||
|
void |
addBodyPart(BodyPart part)
Adds a BodyPart to the Multipart.
|
|
void |
addBodyPart(BodyPart part,
int index)
Adds a BodyPart at position index.
|
|
BodyPart |
getBodyPart(int index)
Retrieves the specified Part.
|
|
String |
getContentType()
Retrieves the content-type of this Multipart.
|
|
int |
getCount()
Retrieves the number of enclosed BodyPart objects.
|
|
Part |
getParent()
Retrieves the Part that contains this Multipart object.
|
|
boolean |
removeBodyPart(BodyPart part)
Removes the specified BodyPart from the multipart message.
|
|
void |
removeBodyPart(int index)
Removes the Part at specified location (starting from 0).
|
|
void |
setParent(Part parent)
Sets the parent of this Multipart to be the specified Part.
|
|
void |
writeTo(OutputStream os)
Outputs an appropriately encoded bytestream to the given OutputStream. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String _contentType
protected Part _parent
Multipart, if known.protected Vector _parts
BodyPart objects.| Constructor Detail |
public Multipart()
public Multipart(String type)
type - The type of the Multipart. Some messaging systems provide different subtypes of Multiparts. For
example, MIME specifies a set of subtypes that include "alternative",
"mixed", "related", "parallel", "signed", etc.protected Multipart(String type, Part parent)
Part.
type - The type of the Multipart.
Some messaging systems provide different subtypes of Multiparts. For
example, MIME specifies a set of subtypes that include "alternative",
"mixed", "related", "parallel", "signed", and so on.parent - The Part that owns this Multipart.protected Multipart(Part parent)
| Method Detail |
public void writeTo(OutputStream os) throws IOException
Outputs an appropriately encoded bytestream to the given OutputStream.
This method is not thread safe.
os - An output stream of bytes.IOException - A general I/O error.public void addBodyPart(BodyPart part)
BodyPart to the Multipart.
part - A BodyPart object to add to this Multipart. If null, no operation is performed.public void addBodyPart(BodyPart part, int index)
BodyPart at position index.
part - A BodyPart object to add to this Multipart. If null, no operation is performed.index - An index to indicate the position in the Multipart
at which to add the BodyPart.public BodyPart getBodyPart(int index)
Part.
index - An index to indicate the position of the BodyPart to retrieve.BodyPart object from the specified position in the Multipart.public String getContentType()
Multipart.
Multipart contents.public int getCount()
BodyPart objects.
BodyPart objects.public Part getParent()
Part that contains this Multipart object.
Part that contains this Multipart object,
or null if unknown.public boolean removeBodyPart(BodyPart part)
BodyPart from the multipart message.
part - The BodyPart to remove from the message.BodyPart was removed successfully, otherwise false.public void removeBodyPart(int index)
Part at specified location (starting from 0).
index - The location of the BodyPart object in the Multipart.public void setParent(Part parent)
Multipart to be the specified Part.
parent - The Part to set as the parent of this Multipart.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.