SHOW Signed

net.rim.blackberry.api.mail
Class SupportedAttachmentPart

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

public class SupportedAttachmentPart
extends BodyPart

Represents an attachment part that has a corresponding viewer on the handheld, including registered third-party viewers.

Only attachment parts that have supported viewers or handlers on the handheld are instantiated as this object.

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

Inner classes inherited from class net.rim.blackberry.api.mail.BodyPart
BodyPart.ContentType
 
Fields inherited from class net.rim.blackberry.api.mail.BodyPart
CONTENT_TYPE, CRLF, EMPTY, SEPARATOR
 
Fields inherited from interface net.rim.blackberry.api.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
 Category: Signed SupportedAttachmentPart(Multipart parent)
          Creates a new SupportedAttachmentPart instance with the provided parent.
 Category: Signed SupportedAttachmentPart(Multipart parent, String contentType, String filename, byte[] data)
          Creates a new SupportedAttachmentPart instance with provided parent, content-type, and data.
 
Method Summary
 Category: Signed  Object getContent()
          Retrieves the raw data contained in this attachment part.
 Category: Signed  String getContentType()
          Retrieves the content-type for this attachment part.
 Category: Signed  String getFilename()
          Retrieves the filename (if any) associated with this attachment part.
 Category: Signed  InputStream getInputStream()
          Retrieves an input stream for this attachment part.
 Category: Signed  String getName()
          Retrieves the filename for this attachment part.
 Category: Signed  int getSize()
          Retrieves the size of this attachment part's data.
 Category: Signed  void setContent(Object content)
          Sets the content for this attachment content
 Category: Signed  void setContentType(String value)
          Sets the content-type for this attachment part.
 Category: Signed  void setFilename(String filename)
          Sets the filename for this attachment part.
 Category: Signed  void writeTo(OutputStream out)
          Writes the name and data of this attachment part to the provided output stream.
 
Methods inherited from class net.rim.blackberry.api.mail.BodyPart
addHeader, getAllHeaders, getHeader, getParent, hasMore, isMimeType, moreRequestSent, removeHeader, setHeader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportedAttachmentPart

public SupportedAttachmentPart(Multipart parent)
Creates a new SupportedAttachmentPart instance with the provided parent.
Parameters:
parent - Existing multipart to act as this part's parent.
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.

SupportedAttachmentPart

public SupportedAttachmentPart(Multipart parent,
                               String contentType,
                               String filename,
                               byte[] data)
Creates a new SupportedAttachmentPart instance with provided parent, content-type, and data.
Parameters:
parent - Existing multipart object to contain this attachment part.
contentType - MIME content-type of this attachment part.
filename - File name of this attachment.
data - Data contained in this attachment 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.
Method Detail

getInputStream

public InputStream getInputStream()
Retrieves an input stream for this attachment part.
Returns:
Null; sub-classes need to implement this method to provide specific functionality.
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 the content-type for this attachment part.
Overrides:
getContentType in class BodyPart
Returns:
MIME content-type for this attachment 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.

setContentType

public void setContentType(String value)
Sets the content-type for this attachment part.
Overrides:
setContentType in class BodyPart
Parameters:
value - New MIME content-type for this attachment part.
Since:
JDE 4.0.2
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.

getFilename

public String getFilename()
Retrieves the filename (if any) associated with this attachment part.
Returns:
This attachment part's filename.
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.

setFilename

public void setFilename(String filename)
Sets the filename for this attachment part.
Parameters:
filename - New filename for this attachment part.
Since:
JDE 4.0.2
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)
Sets the content for this attachment content
Parameters:
content - New content for this attachment part; only a raw byte object is supported.
Since:
JDE 4.0.2
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()
Retrieves the raw data contained in this attachment part.
Returns:
Raw bytes that make up the attachment 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.

getSize

public int getSize()
Retrieves the size of this attachment part's data.
Returns:
Length of this attachment part's contained data in bytes.
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 out)
             throws IOException
Writes the name and data of this attachment part to the provided output stream.
Overrides:
writeTo in class BodyPart
Parameters:
out - Output stream to which to write attachment data.
Throws:
IOException - If an I/O error occurs.
Since:
JDE 4.0.2
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.

getName

public String getName()
Retrieves the filename for this attachment part.
Returns:
The name of the underlying attachment file.
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-2004 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.