|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.mail.Address
public class Address
A class describing the RFC 2822 address specification as per par. 3.4
Field Summary | |
---|---|
static int |
BCC
Address is used in a BCC recipient |
static int |
CC
Address is used in a CC recipient |
static int |
FROM
Address is used in a FROM recipient |
static int |
REPLYTO
Address is used in a REPLYTO recipient |
static int |
TO
Address is used in a TO recipient |
Constructor Summary | |
---|---|
Address()
Default Constructor |
|
Address(int type,
java.lang.String address)
Initializes a new instance of Address, parsing address |
|
Address(int type,
java.lang.String name,
java.lang.String address)
Initializes a new instance of Address |
Method Summary | |
---|---|
java.lang.String |
getEmail()
Accessor method to get this address email field |
java.lang.String |
getName()
Accessor method to get this address name field |
int |
getType()
Accessor method to get the type of this address |
java.lang.String |
getVisibleName()
Accessor method to get this address' visible name representation: |
static Address[] |
parse(int type,
java.lang.String addresslist)
Parses an address list and return an array of Address
objects, each representing a recipient. |
void |
setEmail(java.lang.String email)
Accessor method to set this address' email |
void |
setName(java.lang.String name)
Accessor method to set the name of this address |
void |
setType(int type)
Accessor method to set the type of this address |
java.lang.String |
toString()
Overloads toString() Object' method to return this address representation in RFC2822 format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FROM
public static final int TO
public static final int CC
public static final int BCC
public static final int REPLYTO
Constructor Detail |
---|
public Address()
public Address(int type, java.lang.String address) throws MailException
address
.
If address
contains more than one email address,
only the first one is used and the others are ignored.
Use Adress.parse to get an array of Address from an address list.
- Parameters:
type
- is the type of this addressaddress
- is the String representation of the address to be parsed
- Throws:
MailException
- when some error occurs parsing address
public Address(int type, java.lang.String name, java.lang.String address) throws MailException
type
- is the type of addressname
- is the name of the Addressaddress
- is the email of this address
MailException
Method Detail |
---|
public int getType()
public java.lang.String getVisibleName()
public java.lang.String getName()
public java.lang.String getEmail()
public void setType(int type)
type
- is the type to be set for this addresspublic void setName(java.lang.String name)
name
- is the name to be set for this addresspublic void setEmail(java.lang.String email) throws MailException
email
- is the email string value to be set
MailException
- if some error occurs while check address' emailpublic static Address[] parse(int type, java.lang.String addresslist) throws MailException
Address
objects, each representing a recipient.
Use: Address [] list = Address.parse( Address.TO, "John
Doe
addresslist
- the comma separated list of addresses
Address
containing the result, or an
empty array if addresslist is empty
MailException
- if the address is malformedpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |