com.aspose.email
Class MapiAttachment

java.lang.Object
  extended by com.aspose.email.MapiPropertyContainer
      extended by com.aspose.email.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.
 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 getLongFileName()
           Gets an attachment's long filename and extension, excluding path.
 String getMimeTag()
           Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment.
 MapiObjectProperty getObjectData()
           Gets an attachment object typically accessed through the OLE IStorage interface.
 MapiPropertyStream getPropertyStream()
           Gets the property stream.
 MapiPropertyCollection getSubStorages()
           Gets the sub storages.
 void save(OutputStream stream)
           
 void save(String filename)
           Save attachment content.
 void setBinaryData(byte[] value)
           
 void setProperty(MapiAttachment value, long signed, long tag)
           Sets the property.
 void setProperty(MapiProperty property)
           Sets the property.
 void setProperty(MapiProperty value, long signed, long tag)
           Sets the property.
 void setProperty(MapiPropertyStream value, long signed, long tag)
           Sets the property.
 void setProperty(MapiRecipient value, long signed, long tag)
           Sets the property.
 void setPropertySet(MapiProperty value, long signed, long tag)
           Sets the property set.
 
Methods inherited from class com.aspose.email.MapiPropertyContainer
getCodePage, getMyProperties, getProperties, getPropertyBoolean, getPropertyBytes, getPropertyDateTime, getPropertyInt32, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, setNamedPropertyMapping, setProperty, tryGetPropertyData, tryGetPropertyDateTime, tryGetPropertyInt32, tryGetPropertyLong, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString, tryGetPropertyString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

save

public void save(OutputStream stream)

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(MapiPropertyStream 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.


Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.