com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MapiAttachment



  • public class MapiAttachment
    extends MapiPropertyContainer

    Represents the attachment in the E-mail message.

    • Method Detail

      • getExtension

        public String getExtension()

        Gets a filename extension that indicates the document type of an attachment.

        Value: The extension.
      • getPropertyStream

        public MapiPropertyStream getPropertyStream()

        Gets the property stream.

        Value: The property stream.
      • getSubStorages

        public MapiPropertyCollection getSubStorages()

        Gets the sub storages.

        Value: The sub storages.
      • getFileName

        public String getFileName()

        Gets an attachment's base filename and extension, excluding path.

        Value: The file name.
      • getLongFileName

        public String getLongFileName()

        Gets an attachment's long filename and extension, excluding path.

        Value: The long file name.
      • getDisplayName

        public String getDisplayName()

        Gets the display name of the ole object in an attachment.

        Value: The display name.
      • getMimeTag

        public String getMimeTag()

        Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment.

        Value: The mime tag.
      • getItemId

        public String getItemId()

        The attachment id, uses with exchange server

      • getBinaryData

        public byte[] getBinaryData()

        Gets or sets binary attachment data.

        Value: The binary data.
      • setBinaryData

        public void setBinaryData(byte[] value)

        Gets or sets binary attachment data.

        Value: The binary data.
      • getContent

        public Object getContent()

        Gets the content.

        Value: The content.
      • getObjectData

        public MapiObjectProperty getObjectData()

        Gets an attachment object typically accessed through the OLE IStorage interface.

        Value: The object data.
      • getNamedProperties

        public MapiPropertyCollection getNamedProperties()

        Gets the named properties of message.

        Value: The collection of named properties.
      • save

        public void save(String filename)

        Save attachment content.

        Parameters:
        filename - The file name to save.
      • save

        public void save(OutputStream stream)

        Save attachment content.

        Parameters:
        stream - The stream to save.
      • setProperty

        public void setProperty(MapiProperty property)

        Sets the property.

        Specified by:
        setProperty in class MapiPropertyContainer
        Parameters:
        property - The property.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If property is null.
        com.aspose.ms.System.ArgumentException - If property data is null.
        com.aspose.ms.System.InvalidOperationException - If data type is not supported.
      • removeProperty

        public void removeProperty(long tag)

        Provides correctly removing property from all collections.

        Parameters:
        tag - The tag of MapiProperty.
      • createMapiNode

        public com.aspose.email.IMapiNode createMapiNode(String key)

        Creates the mapi node.

        Overrides:
        createMapiNode in class MapiPropertyContainer
        Parameters:
        key - The node key.
        Returns:
        The IMapiNode interface.
      • setProperty

        public void setProperty(MapiAttachment value,
                       long signed,
                       long tag)

        Sets the property.

        Overrides:
        setProperty in class MapiPropertyContainer
        Parameters:
        value - The property value.
        signed - The signed.
        tag - The property tag.
      • setProperty

        public void setProperty(MapiRecipient value,
                       long signed,
                       long tag)

        Sets the property.

        Overrides:
        setProperty in class MapiPropertyContainer
        Parameters:
        value - The property value.
        signed - The signed.
        tag - The property tag.
      • setProperty

        public void setProperty(MapiProperty value,
                       long signed,
                       long tag)

        Sets the property.

        Overrides:
        setProperty in class MapiPropertyContainer
        Parameters:
        value - The property value.
        signed - The signed.
        tag - The property tag.
      • setPropertySet

        public void setPropertySet(MapiProperty value,
                          long signed,
                          long tag)

        Sets the property set.

        Overrides:
        setPropertySet in class MapiPropertyContainer
        Parameters:
        value - The proeprty value.
        signed - The signed.
        tag - The property tag.