|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttachmentsCollection
A collection of attachments attached to an Exchange item. An attachment can be a file (ExchangeFileAttachment) or an Exchange item (ExchangeItemAttachment).
The collection allows to get, iterate over and add new attachments.
This class implements the Iterable interface allowing it to be a target of the foreach statement.
Method Summary | |
---|---|
ExchangeFileAttachment |
add(byte[] data,
AttachmentInfo info)
Adds a new file attachment with the specified data and parameters to this collection. |
ExchangeFileAttachment |
add(byte[] data,
java.lang.String name)
Adds a new file attachment with the specified data and parameters to this collection. |
ExchangeItemAttachment |
add(ExchangeItem item)
Adds a new attachment referencing the specified item to this collection. |
ExchangeItemAttachment |
add(ExchangeItem item,
AttachmentInfo info)
Adds a new attachment referencing the specified item to this collection. |
ExchangeItemAttachment |
add(ExchangeItem item,
java.lang.String name)
Adds a new attachment referencing the specified item to this collection. |
ExchangeFileAttachment |
add(java.io.File file)
Reads the content of the specified file and adds the file's data as a new file attachment to this collection. |
ExchangeFileAttachment |
add(java.io.File file,
AttachmentInfo info)
Reads the content of the specified file and adds the file's data as a new file attachment to this collection. |
ExchangeFileAttachment |
add(java.io.File file,
java.lang.String name)
Reads the content of the specified file and adds the file's data as a new file attachment to this collection. |
ExchangeFileAttachment |
add(java.io.InputStream stream,
AttachmentInfo info)
Reads the content of the specified InputStream and adds the read data as a new file attachment to this collection. |
ExchangeFileAttachment |
add(java.io.InputStream stream,
java.lang.String name)
Reads the content of the specified InputStream and adds the read data as a new file attachment to this collection. |
AttachmentsIterator |
iterator()
Returns an iterator over the attachments contained in this collection. |
Methods inherited from interface com.moyosoft.exchange.util.ExchangeCollection |
---|
getAt, getCount |
Method Detail |
---|
AttachmentsIterator iterator()
This method never returns null; an empty iterator is returned if this collection is empty.
iterator
in interface java.lang.Iterable<ExchangeAttachment>
ExchangeAttachment
,
ExchangeFileAttachment
,
ExchangeItemAttachment
ExchangeFileAttachment add(byte[] data, AttachmentInfo info) throws ExchangeServiceException
data
- the content of the attachment.info
- additional information on the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeFileAttachment add(byte[] data, java.lang.String name) throws ExchangeServiceException
data
- the content of the attachment.name
- the displayed name of the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeFileAttachment add(java.io.InputStream stream, AttachmentInfo info) throws ExchangeServiceException, java.io.IOException
stream
- the input stream containing the attachment's data.info
- additional information on the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
java.io.IOException
- if errors occur when reading the supplied input stream.ExchangeFileAttachment add(java.io.InputStream stream, java.lang.String name) throws ExchangeServiceException, java.io.IOException
stream
- the input stream containing the attachment's data.name
- the displayed name of the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
java.io.IOException
- if errors occur when reading the supplied input stream.ExchangeFileAttachment add(java.io.File file, AttachmentInfo info) throws ExchangeServiceException, java.io.IOException
file
- the file to be attached.info
- additional information on the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
java.io.IOException
- if errors occur when reading the specified file.ExchangeFileAttachment add(java.io.File file, java.lang.String name) throws ExchangeServiceException, java.io.IOException
file
- the file to be attached.name
- the displayed name of the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
java.io.IOException
- if errors occur when reading the specified file.ExchangeFileAttachment add(java.io.File file) throws ExchangeServiceException, java.io.IOException
file
- the file to be attached.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
java.io.IOException
- if errors occur when reading the specified file.ExchangeItemAttachment add(ExchangeItem item, AttachmentInfo info) throws ExchangeServiceException
item
- the item to be attached.info
- additional information on the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeItemAttachment add(ExchangeItem item, java.lang.String name) throws ExchangeServiceException
item
- the item to be attached.name
- the displayed name of the attachment.
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeItemAttachment add(ExchangeItem item) throws ExchangeServiceException
item
- the item to be attached.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |