|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.mail.BodyPart
net.rim.blackberry.api.mail.SupportedAttachmentPart
public class SupportedAttachmentPart
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.
| 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 |
| Constructor Summary | ||
|---|---|---|
|
SupportedAttachmentPart(Multipart parent)
Creates a new SupportedAttachmentPart instance with the provided parent. |
|
|
SupportedAttachmentPart(Multipart parent,
String contentType,
String filename,
byte[] data)
Creates a new SupportedAttachmentPart instance with provided parent, content-type, and data. |
|
| Method Summary | ||
|---|---|---|
|
Object |
getContent()
Retrieves the raw data contained in this attachment part. |
|
String |
getContentType()
Retrieves the content-type for this attachment part. |
|
String |
getFilename()
Retrieves the filename (if any) associated with this attachment part. |
|
InputStream |
getInputStream()
Retrieves an input stream for this attachment part. |
|
String |
getName()
Retrieves the filename for this attachment part. |
|
int |
getSize()
Retrieves the size of this attachment part's data. |
|
void |
setContent(Object content)
Sets the content for this attachment content |
|
void |
setContentType(String value)
Sets the content-type for this attachment part. |
|
void |
setFilename(String filename)
Sets the filename for this attachment part. |
|
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 |
|---|
public SupportedAttachmentPart(Multipart parent)
parent - Existing multipart to act as this part's parent.
public SupportedAttachmentPart(Multipart parent,
String contentType,
String filename,
byte[] data)
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.| Method Detail |
|---|
public InputStream getInputStream()
public String getContentType()
getContentType in interface PartgetContentType in class BodyPartpublic void setContentType(String value)
setContentType in class BodyPartvalue - New MIME content-type for this attachment part.public String getFilename()
public void setFilename(String filename)
filename - New filename for this attachment part.public void setContent(Object content)
content - New content for this attachment part; only a raw byte
object is supported.public Object getContent()
public int getSize()
public void writeTo(OutputStream out)
throws IOException
writeTo in interface PartwriteTo in class BodyPartout - Output stream to which to write attachment data.
IOException - If an I/O error occurs.public String getName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.