Attachment Class

Used to represent an attachment associated with a FolderItem. Includes methods to upload and download attachments.


Attachment( file, FolderItem parent )
Attachment( FolderItem item, FolderItem parent )
Attachment( String id, Connection conn )

Public Methods

getID( ) returns String
Returns the unique ID of the attachment.
getName( ) returns String
Returns the name of the attachment (e.g. "Resume.doc").
getContentType( ) returns String
Returns the mime type associated with the attachment (e.g. "image/jpeg").
getContentID( ) returns String
Returns the content id (cid) associated with this attachment. This is useful for resolving inline attachments (e.g. images) found in email messages, calendar invites, and other folder items.
toString( ) returns String
Returns the name of the attachment (e.g. "Resume.doc").
hashCode( ) returns int
Returns the hashCode associated with the attachment ID. If the attachment has not been saved/uploaded, then a temporary hashCode is assigned.
equals( Object obj ) returns boolean
download( Connection conn ) returns
Used to download the attachment. Returns an input stream with the attachment.

Public Classes