net.rim.blackberry.api.mail
Class Multipart
java.lang.Object
net.rim.blackberry.api.mail.Multipart
public class Multipart
- extends Object
A container to hold multiple BodyPart
objects.
- See Also:
Part
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Constructor Summary |
|
|
Multipart()
Creates a new Multipart instance of default type
(multipart mixed string). |
|
|
Multipart(String type)
Creates a new Multipart instance with specified type. |
|
protected |
Multipart(String type,
Part parent)
Creates a new Multipart instance with specified type and parent part. |
|
protected |
Multipart(Part parent)
Creates a new Multipart instance of default type
(multipart mixed string) with parent part. |
Multipart
public Multipart()
- Creates a new Multipart instance of default type
(multipart mixed string).
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Multipart
public Multipart(String type)
- Creates a new Multipart instance with specified type.
- Parameters:
type
- Type for this 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 forth..- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Multipart
protected Multipart(String type,
Part parent)
- Creates a new Multipart instance with specified type and parent part.
- Parameters:
type
- Type for this 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 forth..parent
- Parent part owning this multipart that must be
castable to a Message
object (for example, a Message or subclass
of Message}, otherwise this constructor throws a
ClassCastException
and initialization of this Multipart fails.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Multipart
protected Multipart(Part parent)
- Creates a new Multipart instance of default type
(multipart mixed string) with parent part.
- Parameters:
parent
- Parent part owning this multipart that must be
castable to a Message
object (for example, a Message or subclass
of Message}, otherwise this constructor throws a
ClassCastException
and initialization of this Multipart fails.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
writeTo
public void writeTo(OutputStream os)
throws IOException
- Writes out this multipart to a provided output stream.
Note: This method is not thread safe.
- Parameters:
os
- Output byte stream to receive written multipart.
- Throws:
IOException
- If general I/O error occurs.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
addBodyPart
public void addBodyPart(BodyPart part)
- Adds a body part to this multipart.
- Parameters:
part
- Body part to add to this multipart; if null, does nothing.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
addBodyPart
public void addBodyPart(BodyPart part,
int index)
- Inserts a body part to this multipart at provided index.
- Parameters:
part
- Body part to add to this multipart; if null, does nothing.index
- Position in this multipart at which to add the provided body
part.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getBodyPart
public BodyPart getBodyPart(int index)
- Retrieves body part by index.
- Parameters:
index
- Index position of body part to retrieve.
- Returns:
- Body part from the provided index position in this multipart.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getContentType
public String getContentType()
- Retrieves this multipart's content-type.
- Returns:
- Text string describing this multipart's content type.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getCount
public int getCount()
- Retrieves the number of body parts contained in this multipart.
- Returns:
- Number of contained body parts.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getParent
public Part getParent()
- Retrieves the parent part containing this multipart.
- Returns:
- Thus multipart's parent part, or null if no parent for this multipart.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
removeBodyPart
public boolean removeBodyPart(BodyPart part)
- Removes provided body part from this multipart.
- Parameters:
part
- Body part to remove.
- Returns:
- True if the provided body part was removed; otherwise, false.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
removeBodyPart
public void removeBodyPart(int index)
- Removes body part by index from this multipart.
- Parameters:
index
- Index position of body part to remove from this multipart.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
setParent
public void setParent(Part parent)
- Sets new parent part for this multipart.
- Parameters:
parent
- New parent part for this multipart.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal