Hi there,
I want to write my own Java Message Class in order to support some further functionality. Furthermore, in order to reuse the functionality offered by the Java Mail API I will extend my Message Class from the MimeMessage Class. What I would like to ask is how is it possible when we write a program that reads the inbox such as:
Quote:
Message [] messages = Folder.getMessages();
|
to distinguish MimeMessages, from messages that have been constructed from our own new Java Message class.
Another question that I want to ask is that if we have a boolean variable in the message and we change it will the changes be saved to the message. An example can be the following:
Quote:
class MyMessage extends MimeMessage
{
private boolean bool = false;
MimeMessage(Session session)
{
super(session);
}
public void changeBool(boolean bool)
{
this.bool = bool;
}
}
|