com.genesyslab.ail
Interface Attachment

All Superinterfaces:
IdObject

public interface Attachment
extends IdObject

A file attached to an e-mail.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 java.lang.String getContentType()
          Returns the attachment's MIME content type.
 byte[] getData()
          Returns the content of this attachment as a buffer.
 java.lang.String getFilename()
          Returns the attachment's file name.
 int getSize()
          Returns the size of this attachment.
 void setContentType(java.lang.String mime_content_type)
          Sets the content type of this attachment.
 void setData(byte[] buffer)
          Sets the content of this attachment.
 void setFilename(java.lang.String file_name)
          Modifies the attachment's file name.
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 

Method Detail

getContentType

java.lang.String getContentType()
Returns the attachment's MIME content type. A MIME content type can be "text/plain", "application/x-zip-compressed", and much more... Refer to the RFC 2046 for additional information.


getFilename

java.lang.String getFilename()
Returns the attachment's file name.

Returns:
The file name or null if no file name has been specified.

setFilename

void setFilename(java.lang.String file_name)
Modifies the attachment's file name.

Parameters:
file_name - the file name to set

getData

byte[] getData()
Returns the content of this attachment as a buffer.

Returns:
a buffer as a byte array.

getSize

int getSize()
Returns the size of this attachment.

Returns:
the size of the attachment.
Since:
7.5

setData

void setData(byte[] buffer)
Sets the content of this attachment.

Parameters:
buffer - the content of the attachment as a byte array.
Since:
7.5

setContentType

void setContentType(java.lang.String mime_content_type)
Sets the content type of this attachment.

Parameters:
mime_content_type - the attachment's MIME content type. A MIME content type can be "text/plain", "application/x-zip-compressed", and much more. Refer to the RFC 2046 for additional information.
Since:
7.5