Moyosoft Products | Services | Download | Contact us    
Java Bridge to Exchange
Products  >  Java Bridge to Exchange  >  API Reference    
API Reference
   
Overview  |  
Classic JavaDoc

AttachmentsCollection.add

public ExchangeFileAttachment add(byte data, AttachmentInfo info)

Adds a new file attachment with the specified data and parameters to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
data   the content of the attachment.
info   additional information on the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.

public ExchangeFileAttachment add(byte data, String name)

Adds a new file attachment with the specified data and parameters to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
data   the content of the attachment.
name   the displayed name of the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.

public 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. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
stream   the input stream containing the attachment's data.
info   additional information on the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.
IOException   if errors occur when reading the supplied input stream.

public ExchangeFileAttachment add(java.io.InputStream stream, String name)

Reads the content of the specified InputStream and adds the read data as a new file attachment to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
stream   the input stream containing the attachment's data.
name   the displayed name of the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.
IOException   if errors occur when reading the supplied input stream.

public 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. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
file   the file to be attached.
info   additional information on the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.
IOException   if errors occur when reading the specified file.

public ExchangeFileAttachment add(java.io.File file, String name)

Reads the content of the specified file and adds the file's data as a new file attachment to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
file   the file to be attached.
name   the displayed name of the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.
IOException   if errors occur when reading the specified file.

public 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. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
file   the file to be attached.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.
IOException   if errors occur when reading the specified file.

public ExchangeItemAttachment add(ExchangeItem item, AttachmentInfo info)

Adds a new attachment referencing the specified item to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
item   the item to be attached.
info   additional information on the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.

public ExchangeItemAttachment add(ExchangeItem item, String name)

Adds a new attachment referencing the specified item to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
item   the item to be attached.
name   the displayed name of the attachment.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.

public ExchangeItemAttachment add(ExchangeItem item)

Adds a new attachment referencing the specified item to this collection. The resulting created attachment is automatically attached to the parent item of this collection.

Parameters:
item   the item to be attached.

Returns:
the created attachment.

Throws:
ExchangeServiceException   if any errors occur during the communication with Exchange.

Community comments



Powered by JavaDocPlus