org.opencrx.application.uses.net.freeutils.tnef
Class Message

java.lang.Object
  extended by org.opencrx.application.uses.net.freeutils.tnef.Message

public class Message
extends Object

The Message class encapsulates a TNEF message.

Since:
2003-04-25
Author:
Amichai Rothman

Constructor Summary
Message()
          Constructs an empty Message.
Message(TNEFInputStream in)
          Constructs a Message using the given TNEFInputStream.
 
Method Summary
 void addAttachment(Attachment attachment)
          Adds an attachment to this message.
 void addAttribute(Attr attr)
          Adds an attribute to this message.
 List getAttachments()
          Gets the Message attachments.
 Attr getAttribute(int ID)
          Gets a specific Message attribute.
 List getAttributes()
          Gets the Message attributes.
 MAPIProps getMAPIProps()
          Gets the Message MAPI properties.
 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(List attachments)
          Sets the Message attachments.
 void setAttributes(List attributes)
          Sets the Message attributes.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Constructs an empty Message.


Message

public Message(TNEFInputStream in)
        throws IOException
Constructs a Message using the given TNEFInputStream.

Parameters:
in - the TNEFInputStream containing message data
Throws:
IOException - if an I/O error occurs
Method Detail

read

protected void read(TNEFInputStream in)
             throws IOException
Reads all Message contents from the given TNEFInputStream.

Parameters:
in - the TNEFInputStream containing message data
Throws:
IOException - if an I/O error occurs

getMAPIProps

public MAPIProps getMAPIProps()
                       throws IOException
Gets the Message MAPI properties.

Returns:
the Message MAPI properties, or null of none exist
Throws:
IOException - if an I/O error occurs

getOEMCodePage

public String getOEMCodePage()
Gets the charset name corresponding to the attOemCodepage attribute.

Returns:
the charset name, or null if the attOemCodepage attribute is invalid or does not exist

getAttributes

public List getAttributes()
Gets the Message attributes.

Returns:
the Message attributes

setAttributes

public void setAttributes(List attributes)
Sets the Message attributes.

Parameters:
attributes - the Message attributes

getAttribute

public Attr getAttribute(int ID)
Gets a specific Message attribute.

Parameters:
ID - the requested attribute ID
Returns:
the requested Message attribute, or null if no such attribute exists

getAttachments

public List getAttachments()
Gets the Message attachments.

Returns:
the Message attachments

setAttachments

public void setAttachments(List attachments)
Sets the Message attachments.

Parameters:
attachments - the Message attachments

addAttribute

public void addAttribute(Attr attr)
Adds an attribute to this message.

Parameters:
attr - an attribute to add to this message

addAttachment

public void addAttachment(Attachment attachment)
Adds an attachment to this message.

Parameters:
attachment - an attachment to add to this message

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a string representation of this object


This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.