Class GIT.GVU.IMAP.Message
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class GIT.GVU.IMAP.Message

java.lang.Object
   |
   +----GIT.GVU.IMAP.Message

public class Message
extends Object
Class which represents a single message retrieved from an IMAP server. Note: Some of the fields of this class may be evaluated lazily. Although, this should not matter to the programmer, it may matter to the user.

Constructor Index

 o Message(Vector, int, String, String, Vector, Vector, Vector, Vector, Vector, Vector, String, String, Mailbox, int)
Construct a message object.

Method Index

 o STORE(String, Object)
This function causes the flag set of a message to change.
 o getBCC()
Get the value of the bcc field.
 o getBodyPart()
Get the BodyPart object that corresponds to the main (first) portion of this message.
 o getCC()
Get the value of the cc field.
 o getDate()
Get the date of this message.
 o getFlags()
Get the flags that are set for this message.
 o getFrom()
Get the value of the from field.
 o getInReplyTo()
Get the In-Reply-To line of this mesage.
 o getMailbox()
Get the mailbox this message is in.
 o getMessageID()
Get the Message ID of this mesage.
 o getReplyTo()
Get the value of the reply-to field.
 o getSender()
Get the value of the sender field.
 o getSize()
Get the size of the message in bytes.
 o getSubject()
Get the subject line of this message.
 o getTo()
Get the value of the to field.
 o setBodyPart(BodyPart)
Set the body part associated with this message.

Constructors

 o Message
  public Message(Vector f,
                 int s,
                 String d,
                 String subj,
                 Vector fr,
                 Vector send,
                 Vector rt,
                 Vector t,
                 Vector c,
                 Vector b,
                 String irt,
                 String mid,
                 Mailbox box,
                 int msgno)
Construct a message object.
Parameters:
Vector - f flags as a vector of strings
int - s size of the message in bytes
String - d RFC 822 style date
String - subj subject of the message
Vector - fr Vector of mail address specifying from line
Vector - send Vector of mail address specifying sender line
Vector - rt Vector of mail address specifying reply-to line
Vector - t vector of mail addresses specifying to line
Vector - c vector of mail addresses specifying cc line
Vector - b vector of mail addresses specifying bcc line
String - irt in-reply-to line
String - mid message ID
Mailbox - m mailbox associated with this Message
int - msgno message number for this message

Methods

 o getFrom
  public Vector getFrom()
Get the value of the from field. Note: This is usually going to be a Vector of size 1.
Returns:
Vector of the MailAddress objects which is the from field
 o getSender
  public Vector getSender()
Get the value of the sender field. Note: This is usually going to be a Vector of size 1. Note: When this is not the same as the from field, it indicates something like a mailing list or other type of repeater.
Returns:
Vector of the MailAddress objects which is the sender field
 o getReplyTo
  public Vector getReplyTo()
Get the value of the reply-to field. Note: This is usually going to be a Vector of size 1.
Returns:
Vector of the MailAddress objects which is the reply-to field
 o getTo
  public Vector getTo()
Get the value of the to field.
Returns:
Vector of the MailAddress objects which is the to field.
 o getCC
  public Vector getCC()
Get the value of the cc field. Note: This might be null.
Returns:
Vector of the MailAddress objects which is the cc field.
 o getBCC
  public Vector getBCC()
Get the value of the bcc field. Note: This might be null.
Returns:
Vector of the MailAddress objects which is the bcc field.
 o getFlags
  public Vector getFlags()
Get the flags that are set for this message. This is a vector of strings like \Seen and \Answered.. Note:This will be null if the message is embedded in another message.
Returns:
a vector of strings with the value of the flags
 o getSize
  public int getSize()
Get the size of the message in bytes.
Returns:
an integer with the size of the message in bytes
 o getSubject
  public String getSubject()
Get the subject line of this message.
Returns:
a string with the subject of the message.
 o getMessageID
  public String getMessageID()
Get the Message ID of this mesage.
Returns:
a string with this message's message ID
 o getInReplyTo
  public String getInReplyTo()
Get the In-Reply-To line of this mesage. Note: This usually has a message ID in it so you can do threading. Note: This might be null if its not a reply.
Returns:
a string with the in-reply-to line of the message
 o getDate
  public String getDate()
Get the date of this message. This is returned as a string, which is probably bogus. XXX Fix me! Should return a date object XXX
Returns:
a string with the date of the message
 o getBodyPart
  public BodyPart getBodyPart()
Get the BodyPart object that corresponds to the main (first) portion of this message.
Returns:
BodyPart object which is the body for this message.
 o setBodyPart
  public void setBodyPart(BodyPart bp)
Set the body part associated with this message. This is basically the head of the list for multipart messages.
 o getMailbox
  public Mailbox getMailbox()
Get the mailbox this message is in.
Returns:
mailbox this message is in
 o STORE
  public boolean STORE(String t,
                       Object o) throws InternalErr, IMAPException
This function causes the flag set of a message to change. This is most commonly used to mark messages for deletion.
Parameters:
String - t This is a string whose value must be "+", "-", or "". If its + we will add the flag to this message, - means remove a flag, and empty means set the flags to this value.
Object - o. If you are adding or subtracting flags this should be a string. If you are setting the flags, this should be a vector of strings.
Returns:
true if the command succeeded.
Throws: IMAPException
is propagated
Throws: InternalErr
is thrown if you call STORE with a bad combination of parameters

All Packages  Class Hierarchy  This Package  Previous  Next  Index