com.aspose.network.outlook
Class MapiAttachment

java.lang.Object
  extended by com.aspose.network.outlook.MapiPropertyContainer
      extended by com.aspose.network.outlook.MapiAttachment

public class MapiAttachment
extends MapiPropertyContainer

Represents the attachment in the E-mail message.


Constructor Summary
MapiAttachment()
          Creates a new instance of the MapiAttachment class.
 
Method Summary
 MapiAttachmentType getAttachmentType()
          Gets the attachment type.
 byte[] getBinaryData()
          Gets the binary data by using MapiPropertyTag.PR_ATTACH_DATA_BIN tag.
 String getDisplayName()
          Gets the display name of the ole object in an attachment.
 MapiEmbeddedMessage getEmbeddedMessage()
          Gets the MapiEmbeddedMessage.
 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()
           
 MapiPropertyCollection getProperties()
          Gets the collection of properties.
 void save(String fileName)
          Save attachment to the specified file.
 void setEmbeddedMessage(MapiEmbeddedMessage embeddedMessage)
          Sets the specified MapiEmbeddedMessage to this attachment.
 
Methods inherited from class com.aspose.network.outlook.MapiPropertyContainer
getCodePage, getProperty, getPropertyBinary, getPropertyBooolean, getPropertyByte, getPropertyDateTime, getPropertyDouble, getPropertyFloat, getPropertyInt, getPropertyLong, getPropertyShort, getPropertyString, getPropertyString, setProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapiAttachment

public MapiAttachment()
Creates a new instance of the MapiAttachment class.

Method Detail

getProperties

public MapiPropertyCollection getProperties()
Description copied from class: MapiPropertyContainer
Gets the collection of properties.

Specified by:
getProperties in class MapiPropertyContainer
Returns:
collection of properties.

getBinaryData

public byte[] getBinaryData()
Gets the binary data by using MapiPropertyTag.PR_ATTACH_DATA_BIN tag.

Returns:
array of bytes or null if no such property found.

getObjectData

public MapiObjectProperty getObjectData()

getEmbeddedMessage

public MapiEmbeddedMessage getEmbeddedMessage()
Gets the MapiEmbeddedMessage.

Returns:
MapiEmbeddedMessage or null if no such message found.

setEmbeddedMessage

public void setEmbeddedMessage(MapiEmbeddedMessage embeddedMessage)
Sets the specified MapiEmbeddedMessage to this attachment.

Parameters:
embeddedMessage - message to save.

getAttachmentType

public MapiAttachmentType getAttachmentType()
Gets the attachment type.

Returns:
attachment type.

getDisplayName

public String getDisplayName()
Gets the display name of the ole object in an attachment.

Returns:
display name of the ole object in an attachment.

getExtension

public String getExtension()
Gets a filename extension that indicates the document type of an attachment.

Returns:
filename extension that indicates the document type of an attachment.

getFileName

public String getFileName()
Gets an attachment's base filename and extension, excluding path.

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

getLongFileName

public String getLongFileName()
Gets an attachment's long filename and extension, excluding path.

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

getMimeTag

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

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

save

public void save(String fileName)
Save attachment to the specified file.

Parameters:
fileName - file to save attachment


Copyright © 2011 Aspose. All Rights Reserved.