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.
-
Message(Vector, int, String, String, Vector, Vector, Vector, Vector, Vector, Vector, String, String, Mailbox, int)
- Construct a message object.
-
STORE(String, Object)
- This function causes the flag set of a message to change.
-
getBCC()
- Get the value of the bcc field.
-
getBodyPart()
- Get the BodyPart object that corresponds to the main (first) portion
of this message.
-
getCC()
- Get the value of the cc field.
-
getDate()
- Get the date of this message.
-
getFlags()
- Get the flags that are set for this message.
-
getFrom()
- Get the value of the from field.
-
getInReplyTo()
- Get the In-Reply-To line of this mesage.
-
getMailbox()
- Get the mailbox this message is in.
-
getMessageID()
- Get the Message ID of this mesage.
-
getReplyTo()
- Get the value of the reply-to field.
-
getSender()
- Get the value of the sender field.
-
getSize()
- Get the size of the message in bytes.
-
getSubject()
- Get the subject line of this message.
-
getTo()
- Get the value of the to field.
-
setBodyPart(BodyPart)
- Set the body part associated with this message.
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
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
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
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
getTo
public Vector getTo()
- Get the value of the to field.
- Returns:
- Vector of the MailAddress objects which is the to field.
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.
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.
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
getSize
public int getSize()
- Get the size of the message in bytes.
- Returns:
- an integer with the size of the message in bytes
getSubject
public String getSubject()
- Get the subject line of this message.
- Returns:
- a string with the subject of the message.
getMessageID
public String getMessageID()
- Get the Message ID of this mesage.
- Returns:
- a string with this message's message ID
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
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
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.
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.
getMailbox
public Mailbox getMailbox()
- Get the mailbox this message is in.
- Returns:
- mailbox this message is in
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