public class MapiAttachmentCollection extends ArrayList<MapiAttachment>
Represents a collection of MapiAttachment objects.
Constructor and Description |
---|
MapiAttachmentCollection()
Initializes a new instance of the
MapiAttachmentCollection class. |
MapiAttachmentCollection(MapiMessage owner)
Initializes a new instance of the MapiAttachmentCollection class.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
byte[] data)
Adds the new attachment.
|
void |
addMapiAttachment(MapiAttachment item)
Adds an object to the end of the
T:System.Collections.ObjectModel.Collection`1 . |
void |
insertMapiAttachment(int index,
MapiAttachment item)
Inserts an element into the
T:System.Collections.ObjectModel.Collection`1 at the specified index. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
containsAll, equals, hashCode
public MapiAttachmentCollection()
Initializes a new instance of the MapiAttachmentCollection
class.
public MapiAttachmentCollection(MapiMessage owner)
Initializes a new instance of the MapiAttachmentCollection class.
owner
- The owner message.public void add(String name, byte[] data)
Adds the new attachment.
name
- The name of attachment.data
- The attachment data.com.aspose.email.ms.System.IllegalArgumentException
- throws if attachment name is null or empty.com.aspose.email.ms.System.IllegalArgumentException
- throws if attachment data is null.public void addMapiAttachment(MapiAttachment item)
Adds an object to the end of the T:System.Collections.ObjectModel.Collection`1
.
item
- The object to be added to the end of the T:System.Collections.ObjectModel.Collection`1
. The value can be null for reference types.public void insertMapiAttachment(int index, MapiAttachment item)
Inserts an element into the T:System.Collections.ObjectModel.Collection`1
at the specified index.
index
- The zero-based index at which item
should be inserted.item
- The object to insert. The value can be null for reference types.T:System.ArgumentOutOfRangeException
- index
is less than zero.
-or-
index
is greater than P:System.Collections.ObjectModel.Collection`1.Count
.Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.