Compoze Software, Inc.

com.compoze.mail
Interface IAttachment

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IMessageAttachment
All Known Implementing Classes:
FileAttachment

public interface IAttachment
extends java.io.Serializable

This interface defines an attachment.


Method Summary
 byte[] getBytes()
          Gets the byte data of the attachment.
 java.lang.String getContentType()
          Gets the content type of the attachment or null if not set.
 java.lang.String getName()
          Gets the name of this attachment or null if not set.
 int getSize()
          Gets the size of the attachment (in bytes).
 java.lang.String getSizeKilos()
          Gets the size of this attachment (in kilobytes).
 

Method Detail

getName

public java.lang.String getName()
Gets the name of this attachment or null if not set.
Returns:
the name or null if not set

getBytes

public byte[] getBytes()
                throws MailException
Gets the byte data of the attachment.
Returns:
a byte array of the data of the attachment or an empty array for no data

getSize

public int getSize()
            throws MailException
Gets the size of the attachment (in bytes).
Returns:
the size of the attachment (in bytes) or -1 if the size cannot be determined

getSizeKilos

public java.lang.String getSizeKilos()
                              throws MailException
Gets the size of this attachment (in kilobytes).
Returns:
the size of this attachment (in kilobytes) or empty if the size cannot be determined

getContentType

public java.lang.String getContentType()
Gets the content type of the attachment or null if not set.
Returns:
the content type or null if not set

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.