SHOW Signed

net.rim.blackberry.api.mail
Class ContactAttachmentPart

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

public class ContactAttachmentPart
extends BodyPart

Encapuslates an address card attachment part.

This class makes use of the Contact class provided by the PIM API.

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.

See Also:
Contact

Inner classes inherited from class net.rim.blackberry.api.mail.BodyPart
BodyPart.ContentType
 
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 ContactAttachmentPart(Multipart parent)
          Creates an empty contact attachment part.
 Category: Signed ContactAttachmentPart(Multipart parent, Contact contact)
          Creates a contact attachment part from a contact.
 
Method Summary
 Category: Signed  Object getContent()
          Retrieves the contents of the Part.
 Category: Signed  InputStream getInputStream()
          Returns an input stream containing the contact in a serial format (typically vcard)
 Category: Signed  int getSize()
          The size of the serialized object, that is, the VCard representation.
 Category: Signed  void setContent(Object content)
          Sets the contents of this Part.
 Category: Signed  void writeTo(OutputStream out)
          Writes the contact information to an output stream.
 
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
 

Constructor Detail

ContactAttachmentPart

public ContactAttachmentPart(Multipart parent)
Creates an empty contact attachment part.

Parameters:
parent - The Multipart to which to add this ContactAttachmentPart.
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.

ContactAttachmentPart

public ContactAttachmentPart(Multipart parent,
                             Contact contact)
Creates a contact attachment part from a contact.

Parameters:
parent - The Multipart to which to add this ContactAttachmentPart.
contact - The Contact for which to create this address card attachment.
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()
Returns an input stream containing the contact in a serial format (typically vcard)

Following copied from interface: net.rim.blackberry.api.mail.Part
Returns:
An input stream of 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.

setContent

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

Parameters:
content - a Contact instance. all other types result in a no-op
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 Contact object associated, or null if not set
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()
The size of the serialized object, that is, the VCard representation.

Returns:
Size of the vCard representation.
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 contact information to an output stream. Datapayload format is vcard.

Overrides:
writeTo in class BodyPart
Parameters:
out - Output stream.
Throws:
IOException - Input/output exception.
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.