SHOW Signed

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.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0
See Also:
Part

Constructor Summary
 Category: Signed   Multipart()
          Creates a new Multipart instance of default type (multipart mixed string).
 Category: Signed protected Multipart(Part parent)
          Creates a new Multipart instance of default type (multipart mixed string) with parent part.
 Category: Signed   Multipart(String type)
          Creates a new Multipart instance with specified type.
 Category: Signed protected Multipart(String type, Part parent)
          Creates a new Multipart instance with specified type and parent part.
 
Method Summary
 Category: Signed  void addBodyPart(BodyPart part)
          Adds a body part to this multipart.
 Category: Signed  void addBodyPart(BodyPart part, int index)
          Inserts a body part to this multipart at provided index.
 Category: Signed  BodyPart getBodyPart(int index)
          Retrieves body part by index.
 Category: Signed  String getContentType()
          Retrieves this multipart's content-type.
 Category: Signed  int getCount()
          Retrieves the number of body parts contained in this multipart.
 Category: Signed  Part getParent()
          Retrieves the parent part containing this multipart.
 Category: Signed  boolean removeBodyPart(BodyPart part)
          Removes provided body part from this multipart.
 Category: Signed  void removeBodyPart(int index)
          Removes body part by index from this multipart.
 Category: Signed  void setParent(Part parent)
          Sets new parent part for this multipart.
 Category: Signed  void writeTo(OutputStream os)
          Writes out this multipart to a provided output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Multipart

public Multipart()
Creates a new Multipart instance of default type (multipart mixed string).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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..
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getContentType

public String getContentType()
Retrieves this multipart's content-type.
Returns:
Text string describing this multipart's content type.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getCount

public int getCount()
Retrieves the number of body parts contained in this multipart.
Returns:
Number of contained body parts.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

setParent

public void setParent(Part parent)
Sets new parent part for this multipart.
Parameters:
parent - New parent part for this multipart.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.