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 final String getExtension()

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

        Value: The extension.
      • getPropertyStream

        public final MapiPropertyStream getPropertyStream()

        Gets the property stream.

        Value: The property stream.
      • getSubStorages

        public final MapiPropertyCollection getSubStorages()

        Gets the sub storages.

        Value: The sub storages.
      • getFileName

        public final String getFileName()

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

        Value: The file name.
      • getLongFileName

        public final String getLongFileName()

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

        Value: The long file name.
      • getDisplayName

        public final String getDisplayName()

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

        Value: The display name.
      • getMimeTag

        public final String getMimeTag()

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

        Value: The mime tag.
      • getItemId

        public final String getItemId()

        The attachment id, uses with exchange server

      • getBinaryData

        public final byte[] getBinaryData()

        Gets or sets binary attachment data.

        Value: The binary data.
      • setBinaryData

        public final void setBinaryData(byte[] value)

        Gets or sets binary attachment data.

        Value: The binary data.
      • getContent

        public final Object getContent()

        Gets the content.

        Value: The content.
      • getObjectData

        public final MapiObjectProperty getObjectData()

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

        Value: The object data.
      • getNamedProperties

        public final MapiPropertyCollection getNamedProperties()

        Gets the named properties of message.

        Value: The collection of named properties.
      • save

        public final void save(String filename)

        Save attachment content.

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

        public final void save(OutputStream stream)

        Save attachment content.

        Parameters:
        stream - The stream to save.
      • setProperty

        public void setProperty(MapiProperty value)

        Sets the property.

        Overrides:
        setProperty in class MapiPropertyContainer
        Parameters:
        value - The property.
        Throws:
        com.aspose.ms.System.ArgumentNullException - If value 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 final 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 final void setProperty(PropertyDescriptor pd,
                       Object value)

        Sets MAPI property.

        Parameters:
        pd - The property descriptor.
        value - The property data.