public final class EmailModel
extends java.lang.Object
This object will be created and sent to observers by the MailSaver
object.
It contains useful data such as the content of the email and its path in the
file system.
| Constructor and Description |
|---|
EmailModel()
Instantiates a new email model.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEmailStr()
Gets the email str.
|
java.lang.String |
getFilePath()
Gets the file path.
|
java.lang.String |
getFrom()
Gets the from.
|
java.util.Date |
getReceivedDate()
Gets the received date.
|
java.lang.String |
getSubject()
Gets the subject.
|
java.lang.String |
getTo()
Gets the to.
|
void |
save(java.io.OutputStream outputStream,
java.nio.charset.Charset charset)
Saves the mail into an output stream like a file.
|
void |
setEmailStr(java.lang.String emailStr)
Sets the email str.
|
void |
setFilePath(java.lang.String filePath)
Sets the file path.
|
void |
setFrom(java.lang.String from)
Sets the from.
|
void |
setReceivedDate(java.util.Date receivedDate)
Sets the received date.
|
void |
setSubject(java.lang.String subject)
Sets the subject.
|
void |
setTo(java.lang.String to)
Sets the to.
|
java.lang.String |
toString() |
public java.lang.String getEmailStr()
public java.lang.String getFilePath()
public java.lang.String getFrom()
public java.util.Date getReceivedDate()
public java.lang.String getSubject()
public java.lang.String getTo()
public void save(java.io.OutputStream outputStream,
java.nio.charset.Charset charset)
throws java.io.IOException
outputStream - the output streamcharset - the charsetjava.io.IOException - Signals that an I/O exception has occurred.public void setEmailStr(java.lang.String emailStr)
emailStr - the new email strpublic void setFilePath(java.lang.String filePath)
filePath - the new file pathpublic void setFrom(java.lang.String from)
from - the new frompublic void setReceivedDate(java.util.Date receivedDate)
receivedDate - the new received datepublic void setSubject(java.lang.String subject)
subject - the new subjectpublic void setTo(java.lang.String to)
to - the new topublic java.lang.String toString()
toString in class java.lang.Object