|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.email.EmailAddress
public class EmailAddress
Implements basic functionality for parsing and validating the syntax of an email address.
Example Usage:
// create new instance EmailAdress email = new EmailAddress("user@myserver.com"); // check for validity System.out.println("Valid: " + email.isValid());
Constructor Summary | |
---|---|
EmailAddress(java.lang.String email)
Constructs a new EmailAddress . |
Method Summary | |
---|---|
java.lang.String |
getDomain()
Gets the domain portion of the email address. |
java.lang.String |
getEmail()
Return the full email address in the form user@domain. |
java.lang.String |
getName()
Gets the name portion of the email address. |
java.lang.String |
getUser()
Gets the user portion of the email address. |
boolean |
isValid()
Checks to see if this email address is syntactically valid. |
java.lang.String |
toString()
Get full email address. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EmailAddress(java.lang.String email)
EmailAddress
.
email
- the email address
Valid email addresses examples:
jsmith@domain.com
<jsmith@domain.com>
John Smith <jsmith@domain.com>
jsmith@domain.com (John Smith)
Method Detail |
---|
public boolean isValid()
true
if email address is valid false
otherwisepublic java.lang.String getEmail()
public java.lang.String getUser()
public java.lang.String getDomain()
public java.lang.String getName()
null
if not availalbepublic java.lang.String toString()
toString
in class java.lang.Object
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |