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

Class GIT.GVU.IMAP.Tests.Display

java.lang.Object
   |
   +----GIT.GVU.IMAP.Tests.Display

public class Display
extends Object
Class which implements some printing functions for the little mail reader.

Constructor Index

 o Display()

Method Index

 o buildFlags(Message)
Build a list of flags for this mail message
 o buildShortFrom(Message)
Build a short form of a mail address that a mail message is from.
 o displayBody(String, int)
Print the body of a text message on the terminal
 o displayHeaders(Mailbox)
Display the headers of your mail
 o displayMessage(Connection, int)
This is the function that displays a mail message.
 o displayStructure(BodyPart, int, int)
Print message structure out on the terminal

Constructors

 o Display
  public Display()

Methods

 o displayMessage
  public static void displayMessage(Connection c,
                                    int n) throws InternalErr, IMAPException, IOException
This is the function that displays a mail message.
Parameters:
Connection - c connection to work from
int - n message number
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o displayStructure
  public static int displayStructure(BodyPart bp,
                                     int indent,
                                     int lineup)
Print message structure out on the terminal
Parameters:
BodyPart - bp beginning of the list of body parts to walk over
int - indent amount to indent per level of nesting
int - lineup amount to indent all lines to offset the display from the left margin
 o displayBody
  public static void displayBody(String m,
                                 int s) throws IOException
Print the body of a text message on the terminal
Parameters:
String - m message's text
int - s how many header lines have been printed
Throws: IOException
is propagated
 o buildShortFrom
  public static String buildShortFrom(Message m)
Build a short form of a mail address that a mail message is from.
Parameters:
Message - m message of interest
Returns:
a string with a shortened form of a name for this person (preferably the From)
 o displayHeaders
  public static void displayHeaders(Mailbox m) throws InternalErr, IMAPException
Display the headers of your mail
Parameters:
Mailbox - m Mailbox to show the headers of
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o buildFlags
  public static String buildFlags(Message m)
Build a list of flags for this mail message
Parameters:
Message - m message to extract flags from
Returns:
a string with the flags (as characters, always 5 characters long)

All Packages  Class Hierarchy  This Package  Previous  Next  Index