javax.mail.internet
Class NewsAddress
- Serializable
A representation of an RFC1036 Internet newsgroup address.
protected String | host - The host for this newsgroup
|
protected String | newsgroup - The name of this newsgroup
|
boolean | equals(Object o) - Subclasses must provide a suitable implementation of equals().
|
String | getHost()
|
String | getNewsgroup()
|
String | getType() - The type of this address; always "news".
|
int | hashCode()
|
static NewsAddress[] | parse(String addresses) - Parse a comma-spearated list of addresses.
|
void | setHost(String host)
|
void | setNewsgroup(String newsgroup)
|
String | toString() - Subclasses must provide a suitable representation of their address.
|
static String | toString(Address[] addresses) - Convert the supplied addresses to a comma-separated String.
|
host
protected String host
The host for this newsgroup
newsgroup
protected String newsgroup
The name of this newsgroup
NewsAddress
public NewsAddress()
NewsAddress
public NewsAddress(String newsgroup)
NewsAddress
public NewsAddress(String newsgroup,
String host)
equals
public boolean equals(Object o)
Subclasses must provide a suitable implementation of equals().
- equals in interface Address
- true if the subclass determines the other object is equal to this Address
getHost
public String getHost()
getNewsgroup
public String getNewsgroup()
getType
public String getType()
The type of this address; always "news".
- getType in interface Address
hashCode
public int hashCode()
parse
public static NewsAddress[] parse(String addresses)
throws AddressException
Parse a comma-spearated list of addresses.
addresses
- the list to parse
- the array of extracted addresses
setHost
public void setHost(String host)
setNewsgroup
public void setNewsgroup(String newsgroup)
toString
public String toString()
Subclasses must provide a suitable representation of their address.
- toString in interface Address
- a representation of an Address as a String
toString
public static String toString(Address[] addresses)
Convert the supplied addresses to a comma-separated String.
If addresses is null, returns null; if empty, returns an empty string.
addresses
- the addresses to convert
- a comma-separated list of addresses