|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.dataobjects.MailPart
com.openexchange.mail.dataobjects.compose.DataMailPart
public abstract class DataMailPart
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.openexchange.mail.dataobjects.compose.ComposedMailPart |
|---|
ComposedMailPart.ComposedPartType |
| Field Summary |
|---|
| Fields inherited from class com.openexchange.mail.dataobjects.MailPart |
|---|
NO_ENCLOSED_PARTS |
| Method Summary | |
|---|---|
java.lang.Object |
getContent()
Returns the part's content as a Java object dependent on underlying implementation. |
javax.activation.DataHandler |
getDataHandler()
Returns an appropriate DataHandler for this mail part. |
int |
getEnclosedCount()
Gets the number of enclosed mail parts. |
MailPart |
getEnclosedMailPart(int index)
Gets the mail part located at given index. |
java.lang.String |
getFileID()
Gets this data part's file ID if its content has been written to disc. |
java.io.InputStream |
getInputStream()
Returns an input stream for this part. |
ComposedMailPart.ComposedPartType |
getType()
|
void |
loadContent()
Ensures that the part's content is loaded, thus this part is independent of the original. |
void |
prepareForCaching()
Prepares this mail part to be put into cache; meaning to release all kept resources |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.Object getContent()
throws MailException
MailPartmultipart/*
getContent in class MailPartnull if not applicable
MailException - If content cannot be returned as a Java object
public javax.activation.DataHandler getDataHandler()
throws MailException
MailPartDataHandler for this mail part. multipart/*
getDataHandler in class MailPartDataHandler or null if not applicable
MailException - If an appropriate DataHandler cannot be returned
public int getEnclosedCount()
throws MailException
MailPartmultipart/*
getEnclosedCount in class MailPartMailPart.NO_ENCLOSED_PARTS if not applicable
MailExceptionMailPart.NO_ENCLOSED_PARTS
public MailPart getEnclosedMailPart(int index)
throws MailException
MailPartmultipart/*
getEnclosedMailPart in class MailPartindex - The index of desired mail part or null if not applicable
MailException
public java.io.InputStream getInputStream()
throws MailException
MailPartmultipart/*
getInputStream in class MailPartnull if not applicable
MailException - If no input stream could be returnedpublic ComposedMailPart.ComposedPartType getType()
getType in interface ComposedMailPartComposedMailPart.ComposedPartType enumeration type
public void loadContent()
throws MailException
MailPartThis method is intended for mailing systems that read the contents stepwise on demand. If dealing with such a mail part with its underlying connection closed, the part's content is no more accessible. Otherwise this method may be implemented with an empty body.
Moreover the loaded content is no more discarded when MailPart.prepareForCaching() is invoked.
loadContent in class MailPartMailException - If loading part's content failspublic void prepareForCaching()
MailPart
prepareForCaching in class MailPartpublic java.lang.String getFileID()
null if content is kept inside rather than on disc.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||