com.cometway.email
Class EmailHeader
java.lang.Object
com.cometway.email.EmailHeader
public class EmailHeader
- extends java.lang.Object
This class provides a set of static methods for parsing and manipulating headers
in an email message.
|
Method Summary |
static java.lang.String |
getSendToUser(java.lang.String toLine)
This class method takes a String, a user, and
removes the special header characters, such as (Comment), ,
[domain-literal]. |
static java.util.Enumeration |
getSendToUsers(java.lang.String toLine)
This class method takes a String, a list of users separated by comments, and
removes the special header characters, such as (Comment), ,
[domain-literal]. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
removeWhiteSpace(java.lang.String input)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmailHeader
public EmailHeader()
getSendToUsers
public static java.util.Enumeration getSendToUsers(java.lang.String toLine)
- This class method takes a String, a list of users separated by comments, and
removes the special header characters, such as (Comment), ,
[domain-literal]. It also does not checks to make sure after these have been removed, that it is
somewhat of a valid address. A valid address contains an \"@\" and at least one \".\"
- Parameters:
toLine - This is the To: line in the emailheader. This may or maynot include the "TO:"Returns - an enumeration of users as strings
getSendToUser
public static java.lang.String getSendToUser(java.lang.String toLine)
- This class method takes a String, a user, and
removes the special header characters, such as (Comment), ,
[domain-literal]. It also does not checks to make sure after these have been removed, that it is
somewhat of a valid address. A valid address contains an \"@\" and at least one \".\"
This is the same as getSendToUsers(String) method except this only expects one user
- Parameters:
toLine - This is the To: line in the emailheader. This may or maynot include the "TO:"Returns - a String with the username and host
removeWhiteSpace
public static java.lang.String removeWhiteSpace(java.lang.String input)
main
public static void main(java.lang.String[] args)