com.aspose.email

com.aspose.email

Class MapiAttachment

public class MapiAttachment
extends MapiPropertyContainer

Represents the attachment in the E-mail message.

Method Summary
com.aspose.email.IMapiNode
createMapiNode(String key)
Creates the mapi node.
byte[]
getBinaryData()
Gets or sets binary attachment data.
getContent()
Gets the content.
getDisplayName()
Gets the display name of the ole object in an attachment.
getExtension()
Gets a filename extension that indicates the document type of an attachment.
getFileName()
Gets an attachment's base filename and extension, excluding path.
getLongFileName()
Gets an attachment's long filename and extension, excluding path.
getMimeTag()
Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment.
getObjectData()
Gets an attachment object typically accessed through the OLE IStorage interface.
getPropertyStream()
Gets the property stream.
getSubStorages()
Gets the sub storages.
void
save(OutputStream stream)
void
save(String filename)
Save attachment content.
void
setBinaryData(byte[]value)
void
setProperty(MapiAttachment value, longsigned, longtag)
Sets the property.
void
setProperty(MapiProperty property)
Sets the property.
void
setProperty(MapiProperty value, longsigned, longtag)
Sets the property.
void
setProperty(MapiPropertyStream value, longsigned, longtag)
Sets the property.
void
setProperty(MapiRecipient value, longsigned, longtag)
Sets the property.
void
setPropertySet(MapiProperty value, longsigned, longtag)
Sets the property set.
 
Methods inherited from class com.aspose.email.MapiPropertyContainer
 
Methods inherited from class java.lang.Object
 

    • 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.

      • getBinaryData

        public byte[] getBinaryData()

        Gets or sets binary attachment data.

        Value: The binary data.

      • setBinaryData

        public void setBinaryData(byte[] value)
      • 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.

      • save

        public void save(String filename)

        Save attachment content.

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

        public void setProperty(MapiProperty property)

        Sets the property.

        Specified by:
        setProperty in class MapiPropertyContainer
        Parameters:
        property - The property.
        Throws:
        com.aspose.email.ms.System.IllegalArgumentException - If property is null.
        com.aspose.email.ms.System.IllegalArgumentException - If property data is null.
        IllegalStateException - If data type is not supported.
      • 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.