This is a class that contains the basic state needed for message retrieval and threading.
With thanks to Jamie Zawinski <jwz@jwz.org>
addHeaderField
public void addHeaderField(String name,
String val)
Adds an arbitrary header key and value to this message's header.
name
- the header nameval
- the header value
addReference
public void addReference(String msgId)
Adds a message-id to the list of messages that this message references (i.e. replies to)
msgId
-
getArticleId
public String getArticleId()
getArticleNumber
public int getArticleNumber()
getDate
public String getDate()
getFrom
public String getFrom()
getReferences
public String[] getReferences()
Returns the MessageId references as an array of Strings
- an array of message-ids
getSubject
public String getSubject()
printThread
public static void printThread(Article article,
int depth)
Recursive method that traverses a pre-threaded graph (or tree)
of connected Article objects and prints them out.
article
- the root of the article 'tree'depth
- the current tree depth
setArticleId
public void setArticleId(String string)
setArticleNumber
public void setArticleNumber(int i)
setDate
public void setDate(String string)
setFrom
public void setFrom(String string)
setSubject
public void setSubject(String string)