|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.mail.FileAttachment
This class represents a file attachment. It encapsulates a file name, binary data and the content-type of the data.
Constructor Summary | |
FileAttachment()
Constructor. |
|
FileAttachment(java.lang.String sName,
byte[] data)
Constructor. |
|
FileAttachment(java.lang.String sName,
byte[] data,
int iIndex)
Constructor. |
Method Summary | |
byte[] |
getBytes()
Gets the binary data (bytes) of the file attachment. |
java.lang.String |
getContentType()
Gets the content-type of the file attachment. |
java.lang.String |
getFilename()
Gets the name of the file attachment. |
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). |
void |
setBytes(byte[] data)
Sets the binary data (bytes) of the file attachment. |
void |
setContentType(java.lang.String sContentType)
Sets the content-type for the file attachment. |
void |
setFilename(java.lang.String sName)
Sets the name of the file attachment. |
void |
setSize(int iSize)
Sets the size of this attachment. |
java.lang.String |
toString()
Returns the string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FileAttachment()
public FileAttachment(java.lang.String sName, byte[] data)
sName
- the name of the file attachmentdata
- the datapublic FileAttachment(java.lang.String sName, byte[] data, int iIndex)
sName
- the name of the file attachmentdata
- the dataiIndex
- the index of the file attachmentMethod Detail |
public void setFilename(java.lang.String sName)
sName
- the name of the file attachmentpublic java.lang.String getFilename()
public void setBytes(byte[] data)
data
- the datapublic byte[] getBytes()
getBytes
in interface IAttachment
public java.lang.String getContentType()
getContentType
in interface IAttachment
public void setContentType(java.lang.String sContentType)
sContentType
- the content-typepublic int getSize()
IAttachment
getSize
in interface IAttachment
com.compoze.mail.IAttachment
public void setSize(int iSize)
iSize
- the size of the attachment (in bytes)public java.lang.String getSizeKilos() throws MailException
IAttachment
getSizeKilos
in interface IAttachment
com.compoze.mail.IAttachment
public java.lang.String getName()
IAttachment
null
if not set.getName
in interface IAttachment
com.compoze.mail.IAttachment
null
if not setpublic java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |