net.rim.blackberry.api.mail
Class UnsupportedAttachmentPart

java.lang.Object
  extended by net.rim.blackberry.api.mail.BodyPart
      extended by net.rim.blackberry.api.mail.UnsupportedAttachmentPart
All Implemented Interfaces:
Part

public final class UnsupportedAttachmentPart
extends BodyPart

Represents an unsupported attachment part.

This class is not publicly instantiatable; the content type of these parts is always "application/octet-stream".

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

Nested Class Summary
 
Nested classes/interfaces inherited from class net.rim.blackberry.api.mail.BodyPart
BodyPart.ContentType
 
Field Summary
 
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
 
Method Summary
Category: Signed  Object getContent()
          Retrieves this attachment part's content.
Category: Signed  InputStream getInputStream()
          Retrieves an input stream containing this attachment part's data.
Category: Signed  String getName()
          Retrieves this attachment part's filename.
Category: Signed  int getSize()
          Retrieves the size of this attachment part's content.
Category: Signed  void setContent(Object content)
          Sets this attachment part's content from provided object.
Category: Signed  void writeTo(OutputStream out)
          Writes basic information about this attachment part to provided 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
 



Method Detail

getInputStream

public InputStream getInputStream()
Retrieves an input stream containing this attachment part's data.

Not currently supported.

Returns:
Null; sub-classes must override this method to provide expanded functionality.
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

setContent

public void setContent(Object content)
Sets this attachment part's content from provided object.

Not currently supported.

Parameters:
content - Object to provide content. Not currently supported.
Throws:
ClassCastException - if you try to use this method.
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

getContent

public Object getContent()
Retrieves this attachment part's content.

Note: Do not use this method to download an attachment. Instead, use AttachmentDownloadManager.

Returns:
null
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

getSize

public int getSize()
Retrieves the size of this attachment part's content.

Not currently supported.

Returns:
0; sub-classes must override this method to provide expanded functionality.
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 out)
             throws IOException
Writes basic information about this attachment part to provided output stream.

This method first writes two CRLF bytes, and then writes out the filename bytes for this attachment part to the output stream.

Specified by:
writeTo in interface Part
Overrides:
writeTo in class BodyPart
Parameters:
out - Output stream to receive written bytes.
Throws:
IOException - Signals that an I/O error has occurred.
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

getName

public String getName()
Retrieves this attachment part's filename.

Returns:
Filename of the underlying attachment data.
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