javax.mail.internet
Class InternetAddress

java.lang.Object
  extended byjavax.mail.Address
      extended byjavax.mail.internet.InternetAddress
All Implemented Interfaces:
Cloneable, Serializable

public class InternetAddress
extends Address
implements Cloneable

Version:
$Revision: 1.3 $ $Date: 2004/03/10 10:00:28 $
See Also:
Serialized Form

Field Summary
protected  String address
           
protected  String encodedPersonal
           
protected  String personal
           
 
Constructor Summary
InternetAddress()
           
InternetAddress(String address)
           
InternetAddress(String address, boolean strict)
           
InternetAddress(String address, String personal)
           
InternetAddress(String address, String personal, String charset)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 String getAddress()
           
 InternetAddress[] getGroup(boolean strict)
           
static InternetAddress getLocalAddress(Session session)
           
 String getPersonal()
           
 String getType()
           
 int hashCode()
           
 boolean isGroup()
           
static InternetAddress[] parse(String address)
           
static InternetAddress[] parse(String addresses, boolean strict)
           
static InternetAddress[] parseHeader(String addresses, boolean strict)
           
 void setAddress(String address)
           
 void setPersonal(String name)
           
 void setPersonal(String name, String encoding)
           
 String toString()
           
static String toString(Address[] addresses)
           
static String toString(Address[] addresses, int used)
           
 String toUnicodeString()
           
 void validate()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected String address

encodedPersonal

protected String encodedPersonal

personal

protected String personal
Constructor Detail

InternetAddress

public InternetAddress()

InternetAddress

public InternetAddress(String address)
                throws AddressException

InternetAddress

public InternetAddress(String address,
                       boolean strict)
                throws AddressException

InternetAddress

public InternetAddress(String address,
                       String personal)
                throws UnsupportedEncodingException

InternetAddress

public InternetAddress(String address,
                       String personal,
                       String charset)
                throws UnsupportedEncodingException
Method Detail

getLocalAddress

public static InternetAddress getLocalAddress(Session session)

parse

public static InternetAddress[] parse(String address)
                               throws AddressException
Throws:
AddressException

parse

public static InternetAddress[] parse(String addresses,
                                      boolean strict)
                               throws AddressException
Throws:
AddressException

parseHeader

public static InternetAddress[] parseHeader(String addresses,
                                            boolean strict)
                                     throws AddressException
Throws:
AddressException

toString

public static String toString(Address[] addresses)

toString

public static String toString(Address[] addresses,
                              int used)

clone

public Object clone()

equals

public boolean equals(Object other)
Overrides:
equals in class Address

getAddress

public String getAddress()

getGroup

public InternetAddress[] getGroup(boolean strict)
                           throws AddressException
Throws:
AddressException

getPersonal

public String getPersonal()

getType

public String getType()
Specified by:
getType in class Address

hashCode

public int hashCode()

isGroup

public boolean isGroup()

setAddress

public void setAddress(String address)

setPersonal

public void setPersonal(String name)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

setPersonal

public void setPersonal(String name,
                        String encoding)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

toString

public String toString()
Specified by:
toString in class Address

toUnicodeString

public String toUnicodeString()

validate

public void validate()
              throws AddressException
Throws:
AddressException


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.