public class MapiAttachment extends MapiPropertyContainer
Represents the attachment in the E-mail message.
Modifier and Type | Field and Description |
---|---|
protected MapiNamedPropertyMappingStorage |
namedPropertyMappingStorage
The named property mapping storage.
|
Modifier and Type | Method and Description |
---|---|
com.aspose.email.IMapiNode |
createMapiNode(String key)
Creates the mapi node.
|
byte[] |
getBinaryData()
Gets or sets binary attachment data.
|
Object |
getContent()
Gets the content.
|
String |
getDisplayName()
Gets the display name of the ole object in an attachment.
|
String |
getExtension()
Gets a filename extension that indicates the document type of an attachment.
|
String |
getFileName()
Gets an attachment's base filename and extension, excluding path.
|
String |
getItemId()
The item id, uses with a server
|
String |
getLongFileName()
Gets an attachment's long filename and extension, excluding path.
|
String |
getMimeTag()
Gets formatting information about a
Multipurpose Internet Mail Extensions (MIME) attachment.
|
MapiPropertyCollection |
getNamedProperties()
Gets the named properties of message.
|
MapiObjectProperty |
getObjectData()
Gets an attachment object typically accessed
through the OLE IStorage interface.
|
MapiProperty |
getProperty(PropertyDescriptor pd)
Gets MAPI property by property descriptor.
|
MapiPropertyStream |
getPropertyStream()
Gets the property stream.
|
MapiPropertyCollection |
getSubStorages()
Gets the sub storages.
|
void |
removeProperty(long tag)
Provides correctly removing property from all collections.
|
void |
save(OutputStream stream)
Save attachment content.
|
void |
save(String filename)
Save attachment content.
|
void |
setBinaryData(byte[] value)
Gets or sets binary attachment data.
|
void |
setProperty(MapiProperty value)
Sets the property.
|
void |
setProperty(PropertyDescriptor pd,
Object value)
Sets MAPI property.
|
getCodePage, getProperties, getPropertyBoolean, getPropertyBytes, getPropertyDateTime, getPropertyInt32, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, isStoreUnicodeOk, tryGetPropertyData, tryGetPropertyDateTime, tryGetPropertyInt32, tryGetPropertyLong, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString
protected MapiNamedPropertyMappingStorage namedPropertyMappingStorage
The named property mapping storage.
public String getItemId()
The item id, uses with a server
public final String getExtension()
Gets a filename extension that indicates the document type of an attachment.
Value: The extension.public final MapiPropertyStream getPropertyStream()
Gets the property stream.
Value: The property stream.public final MapiPropertyCollection getSubStorages()
Gets the sub storages.
Value: The sub storages.public final String getFileName()
Gets an attachment's base filename and extension, excluding path.
Value: The file name.public final String getLongFileName()
Gets an attachment's long filename and extension, excluding path.
Value: The long file name.public final String getDisplayName()
Gets the display name of the ole object in an attachment.
Value: The display name.public final String getMimeTag()
Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment.
Value: The mime tag.public final byte[] getBinaryData()
Gets or sets binary attachment data.
Value: The binary data.public final void setBinaryData(byte[] value)
Gets or sets binary attachment data.
Value: The binary data.public final Object getContent()
Gets the content.
Value: The content.public final MapiObjectProperty getObjectData()
Gets an attachment object typically accessed through the OLE IStorage interface.
Value: The object data.public final MapiPropertyCollection getNamedProperties()
Gets the named properties of message.
Value: The collection of named properties.public final void save(String filename)
Save attachment content.
filename
- The file name to save.public final void save(OutputStream stream)
Save attachment content.
stream
- The stream to save.public void setProperty(MapiProperty value)
Sets the property.
setProperty
in class MapiPropertyContainer
value
- The property.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.public final void removeProperty(long tag)
Provides correctly removing property from all collections.
tag
- The tag of MapiProperty.public com.aspose.email.IMapiNode createMapiNode(String key)
Creates the mapi node.
createMapiNode
in class MapiPropertyContainer
key
- The node key.public MapiProperty getProperty(PropertyDescriptor pd)
Gets MAPI property by property descriptor.
getProperty
in class MapiPropertyContainer
pd
- Property descriptor for looked propertypublic void setProperty(PropertyDescriptor pd, Object value)
Sets MAPI property.
setProperty
in class MapiPropertyContainer
pd
- The property descriptor.value
- The property data.