SHOW Signed

net.rim.blackberry.api.mail
Class TextBodyPart

java.lang.Object
  |
  +--net.rim.blackberry.api.mail.BodyPart
        |
        +--net.rim.blackberry.api.mail.TextBodyPart
All Implemented Interfaces:
Part

public class TextBodyPart
extends BodyPart

Represents a text/plain body part. This class is used when creating a multipart message that includes a text/plain part.

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.


Inner classes inherited from class net.rim.blackberry.api.mail.BodyPart
BodyPart.ContentType
 
Field Summary
 Category: Signed static String TEXT_PLAIN
          The default content type.
 
Fields inherited from class net.rim.blackberry.api.mail.BodyPart
_parent, CONTENT_TYPE, CRLF, EMPTY, SEPARATOR
 
Fields inherited from interface net.rim.blackberry.api.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
 Category: Signed TextBodyPart(Multipart multipart)
          Creates an empty text body part.
 Category: Signed TextBodyPart(Multipart mp, String text)
          Creates a text body part with body contents.
 
Method Summary
 Category: Signed  Object getContent()
          Retrieves the contents of the Part.
 Category: Signed  InputStream getInputStream()
          Retrieves a stream representation of the body.
 Category: Signed  int getSize()
          Retrieves the size of the contents of this Part.
 Category: Signed  void setContent(Object content)
          Sets the contents of this Part.
 Category: Signed  void writeTo(OutputStream out)
          Writes the body text to the output stream as a raw byte array.
 
Methods inherited from class net.rim.blackberry.api.mail.BodyPart
addHeader, getAllHeaders, getContentType, getHeader, getParent, hasMore, isMimeType, moreRequestSent, removeHeader, setContentType, setHeader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_PLAIN

public static String TEXT_PLAIN
The default content type.
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.
Constructor Detail

TextBodyPart

public TextBodyPart(Multipart multipart)
Creates an empty text body part.

Parameters:
multipart - Multipart in which to create the text body part.
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.

TextBodyPart

public TextBodyPart(Multipart mp,
                    String text)
Creates a text body part with body contents.

Parameters:
mp - Multipart in which to create the text body part.
text - Text to use for body contents.
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

getInputStream

public InputStream getInputStream()
Retrieves a stream representation of the body.

Returns:
An input stream.
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.

setContent

public void setContent(Object content)
Description copied from interface: Part
Sets the contents of this Part.

Parameters:
content - Must be a String.
Since:
JDE 3.6
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.

getContent

public Object getContent()
Description copied from interface: Part
Retrieves the contents of the Part.

Returns:
The content as a String.
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.

getSize

public int getSize()
Description copied from interface: Part
Retrieves the size of the contents of this Part.

Following copied from interface: net.rim.blackberry.api.mail.Part
Returns:
Size in bytes.
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 out)
             throws IOException
Writes the body text to the output stream as a raw byte array. This method prepends two CRLF pairs to the body text.

Overrides:
writeTo in class BodyPart
Parameters:
out - An output stream.
Throws:
IOException - Signals that an I/O exception has occurred.
Since:
JDE 3.6
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-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.