com.aspose.email
Class MessageObject

java.lang.Object
  extended by com.aspose.email.MessageObject
All Implemented Interfaces:
IMessageObjectPropertyContainer

public final class MessageObject
extends Object
implements IMessageObjectPropertyContainer

Represents an Outlook message object. Evaluation limits: only 1 attachment and 1 recipient are read when message is being loaded, watermark will be added when the message is being saved.


Constructor Summary
MessageObject(InputStream stream, int loadFormat)
           
MessageObject(String fileName, int loadFormat)
           Initializes a new instance of the MessageObject class.
 
Method Summary
 MessageObjectAttachmentsCollection getAttachments()
           Gets the attachments of the MessageObject.
 int getCodepage()
           Gets the codepage used to encode/decode string properties in case MapiType.PT_STRING8 type for them is used.
 int getIdForNamedProperty()
           Gets the id to be used for named property, named properties are special properties and should have their ids in range [0x8000,0xfffe] aligned starting from 0x8000 sequentally.
 MessageObjectPropertiesCollection getProperties()
           Gets the properties of the MessageObject.
 MessageObjectRecipientsCollection getRecipients()
           Gets the recipients of the MessageObject.
 void save(OutputStream stream, int format)
           
 void save(String fileName, int format)
           Saves the current message object to the specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageObject

public MessageObject(InputStream stream,
                     int loadFormat)

MessageObject

public MessageObject(String fileName,
                     int loadFormat)

Initializes a new instance of the MessageObject class.

Parameters:
fileName - Name of the file to read from.
loadFormat - The source format message object is stored with.


In addition same set of exceptions could be thrown as for the File.Open(string,System.IO.FileMode) call.

Throws:
com.aspose.email.ms.System.IllegalArgumentException - If specified loadFormat is not supported.
Method Detail

getProperties

public MessageObjectPropertiesCollection getProperties()

Gets the properties of the MessageObject.

Value: The properties.

Specified by:
getProperties in interface IMessageObjectPropertyContainer

getCodepage

public int getCodepage()

Gets the codepage used to encode/decode string properties in case MapiType.PT_STRING8 type for them is used.

Value: The codepage.


getRecipients

public MessageObjectRecipientsCollection getRecipients()

Gets the recipients of the MessageObject.

Value: The recipients.


getAttachments

public MessageObjectAttachmentsCollection getAttachments()

Gets the attachments of the MessageObject.

Value: The attachments.


save

public void save(String fileName,
                 int format)

Saves the current message object to the specified file.

Parameters:
fileName - Name of the file.
format - The format of the output data.


In addition same set of exceptions could be thrown as for the File.OpenWrite call.

Throws:
com.aspose.email.ms.System.IllegalArgumentException - If format value is not valid.

save

public void save(OutputStream stream,
                 int format)

getIdForNamedProperty

public int getIdForNamedProperty()

Gets the id to be used for named property, named properties are special properties and should have their ids in range [0x8000,0xfffe] aligned starting from 0x8000 sequentally. Use this method to find the available id cause it could be hard to calculate it yourself.

Returns:
Available id for the named property.


Copyright (c) 2002-2012 Aspose Pty Ltd. All Rights Reserved.