MessageObject

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.email.IMessageObjectPropertyContainer

public final class MessageObject 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.

Constructors

Constructor Description
MessageObject(InputStream stream, int loadFormat) Initializes a new instance of the MessageObject class.
MessageObject(String fileName, int loadFormat) Initializes a new instance of the MessageObject class.

Methods

Method Description
equals(Object arg0)
getAttachments() Gets the attachments of the MessageObject.
getClass()
getCodepage() Gets the codepage used to encode/decode string properties in case MapiType.PT_STRING8 type for them is used.
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.
getProperties() Gets the properties of the MessageObject.
getRecipients() Gets the recipients of the MessageObject.
hashCode()
notify()
notifyAll()
save(OutputStream stream, int format) Saves the current message object to the specified stream.
save(String fileName, int format) Saves the current message object to the specified file.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

MessageObject(InputStream stream, int loadFormat)

public MessageObject(InputStream stream, int loadFormat)

Initializes a new instance of the MessageObject class.

Parameters:

Parameter Type Description
stream java.io.InputStream The stream to initialize this object from.
loadFormat int The source format message object is stored with.

MessageObject(String fileName, int loadFormat)

public MessageObject(String fileName, int loadFormat)

Initializes a new instance of the MessageObject class.

Parameters:

Parameter Type Description
fileName java.lang.String Name of the file to read from.
loadFormat int The source format message object is stored with.

In addition same set of exceptions could be thrown as for the File#open(String,int).open(String,int) call. |

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getAttachments()

public final MessageObjectAttachmentsCollection getAttachments()

Gets the attachments of the MessageObject.

Value: The attachments.

Returns: MessageObjectAttachmentsCollection

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCodepage()

public final int getCodepage()

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

Value: The codepage.

Returns: int

getIdForNamedProperty()

public final 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: int - Available id for the named property.

getProperties()

public final MessageObjectPropertiesCollection getProperties()

Gets the properties of the MessageObject.

Value: The properties.

Returns: MessageObjectPropertiesCollection

getRecipients()

public final MessageObjectRecipientsCollection getRecipients()

Gets the recipients of the MessageObject.

Value: The recipients.

Returns: MessageObjectRecipientsCollection

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

save(OutputStream stream, int format)

public final void save(OutputStream stream, int format)

Saves the current message object to the specified stream.

Parameters:

Parameter Type Description
stream java.io.OutputStream The stream to write to.
format int The format of the output data.

save(String fileName, int format)

public final void save(String fileName, int format)

Saves the current message object to the specified file.

Parameters:

Parameter Type Description
fileName java.lang.String Name of the file.
format int The format of the output data.

In addition same set of exceptions could be thrown as for the File#openWrite(String).openWrite(String) call. |

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int