public class Message
extends java.lang.Object
Message class encapsulates a TNEF message.| Constructor and Description |
|---|
Message()
Constructs an empty Message.
|
Message(TNEFInputStream in)
Constructs a Message using the given TNEFInputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(Attachment attachment)
Adds an attachment to this message.
|
void |
addAttribute(Attr attr)
Adds an attribute to this message.
|
java.util.List<Attachment> |
getAttachments()
Gets the Message attachments.
|
Attr |
getAttribute(int ID)
Gets a specific Message attribute.
|
java.util.List<Attr> |
getAttributes()
Gets the Message attributes.
|
MAPIProps |
getMAPIProps()
Gets the Message MAPI properties.
|
java.lang.String |
getOEMCodePage()
Gets the charset name corresponding to the
attOemCodepage
attribute. |
protected void |
read(TNEFInputStream in)
Reads all Message contents from the given TNEFInputStream.
|
void |
setAttachments(java.util.List<Attachment> attachments)
Sets the Message attachments.
|
void |
setAttributes(java.util.List<Attr> attributes)
Sets the Message attributes.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public Message()
public Message(TNEFInputStream in) throws java.io.IOException
in - the TNEFInputStream containing message datajava.io.IOException - if an I/O error occursprotected void read(TNEFInputStream in) throws java.io.IOException
in - the TNEFInputStream containing message datajava.io.IOException - if an I/O error occurspublic MAPIProps getMAPIProps() throws java.io.IOException
java.io.IOException - if an I/O error occurspublic java.lang.String getOEMCodePage()
attOemCodepage
attribute.attOemCodepage attribute
is invalid or does not existpublic java.util.List<Attr> getAttributes()
public void setAttributes(java.util.List<Attr> attributes)
attributes - the Message attributespublic Attr getAttribute(int ID)
ID - the requested attribute IDpublic java.util.List<Attachment> getAttachments()
public void setAttachments(java.util.List<Attachment> attachments)
attachments - the Message attachmentspublic void addAttribute(Attr attr)
attr - an attribute to add to this messagepublic void addAttachment(Attachment attachment)
attachment - an attachment to add to this messagepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2024. All Rights Reserved.