com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MessageObject

    • Constructor Detail

      • MessageObject

        public MessageObject(InputStream stream,
                     int loadFormat)

        Initializes a new instance of the MessageObject class.

        Parameters:
        stream - The stream to initialize this object from.
        loadFormat - The source format message object is stored with.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If given stream is null.
        com.aspose.ms.System.ArgumentOutOfRangeException - If specified loadFormat is not supported.
      • 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.ms.System.ArgumentOutOfRangeException - If specified loadFormat is not supported.
    • Method Detail

      • 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.
      • 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.ms.System.ArgumentOutOfRangeException - If format value is not valid.
      • save

        public void save(OutputStream stream,
                int format)

        Saves the current message object to the specified stream.

        Parameters:
        stream - The stream to write to.
        format - The format of the output data.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If stream is null.
        com.aspose.ms.System.ArgumentOutOfRangeException - If format value is not valid.
      • 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.