org.apache.servlet.mail
Class MailAddress
java.lang.Object
|
+--org.apache.servlet.mail.MailAddress
- public class MailAddress
- extends java.lang.Object
- implements java.io.Serializable
This class defines an internet mail address.
- Version:
- pre-draft 1.0 (submitted for review)
- Author:
- Stefano Mazzocchi , Pierpaolo Fumagalli
- See Also:
- Serialized Form
Constructor Summary |
MailAddress(java.lang.String header)
Creates this object from a string with the format:
description <mailbox@host> |
MailAddress(java.lang.String description,
java.lang.String address)
Creates this object from a description and the mail address with the format:
user@host |
MailAddress(java.lang.String description,
java.lang.String mailbox,
java.lang.String host)
Creates this object from description, mailbox and host. |
Method Summary |
java.lang.String |
getAddress()
Returns the address with the format:
mailbox@host |
java.lang.String |
getDescription()
|
java.lang.String |
getHost()
|
java.lang.String |
getMailbox()
|
void |
setDescription(java.lang.String description)
|
void |
setHost(java.lang.String host)
|
void |
setMailbox(java.lang.String mailbox)
|
java.lang.String |
toString()
Returns the fully qualified address with the format:
description <mailbox@host> |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
MailAddress
public MailAddress(java.lang.String header)
- Creates this object from a string with the format:
description <mailbox@host>
MailAddress
public MailAddress(java.lang.String description,
java.lang.String address)
- Creates this object from a description and the mail address with the format:
user@host
MailAddress
public MailAddress(java.lang.String description,
java.lang.String mailbox,
java.lang.String host)
- Creates this object from description, mailbox and host.
setDescription
public void setDescription(java.lang.String description)
setMailbox
public void setMailbox(java.lang.String mailbox)
setHost
public void setHost(java.lang.String host)
getDescription
public java.lang.String getDescription()
getMailbox
public java.lang.String getMailbox()
getHost
public java.lang.String getHost()
getAddress
public java.lang.String getAddress()
- Returns the address with the format:
mailbox@host
toString
public java.lang.String toString()
- Returns the fully qualified address with the format:
description <mailbox@host>
- Overrides:
- toString in class java.lang.Object