javax.mail.internet
Class NewsAddress
- Serializable
An RFC 1036 newsgroup address.
protected String | host - The hostname of the news server.
|
protected String | newsgroup - The name of the newsgroup.
|
NewsAddress() - Constructor for an empty news address.
|
NewsAddress(String newsgroup) - Constructor with the given newsgroup.
|
NewsAddress(String newsgroup, String host) - Constructor with the given newsgroup and host.
|
boolean | equals(Object a)
|
String | getHost() - Returns the hostname of the news server.
|
String | getNewsgroup() - Returns the newsgroup.
|
String | getType() - Returns the type of this address.
|
int | hashCode()
|
static NewsAddress[] | parse(String newsgroups) - Parses the given comma-separated sequence of newsgroups into
NewsAddresses.
|
void | setHost(String host) - Sets the hostname of the news server.
|
void | setNewsgroup(String newsgroup) - Sets the newsgroup.
|
String | toString() - Returns an RFC 1036 string representation of this address.
|
static String | toString(Address[] addresses) - Converts the given array of NewsAddresses into a comma-separated
sequence of address strings.
|
host
protected String host
The hostname of the news server.
newsgroup
protected String newsgroup
The name of the newsgroup.
NewsAddress
public NewsAddress()
Constructor for an empty news address.
NewsAddress
public NewsAddress(String newsgroup)
Constructor with the given newsgroup.
newsgroup
- the newsgroup
NewsAddress
public NewsAddress(String newsgroup,
String host)
Constructor with the given newsgroup and host.
newsgroup
- the newsgrouphost
- the host
getHost
public String getHost()
Returns the hostname of the news server.
getNewsgroup
public String getNewsgroup()
Returns the newsgroup.
getType
public String getType()
Returns the type of this address.
The type of a NewsAddress
is "news".
- getType in interface Address
hashCode
public int hashCode()
parse
public static NewsAddress[] parse(String newsgroups)
throws AddressException
Parses the given comma-separated sequence of newsgroups into
NewsAddresses.
newsgroups
- a comma-separated newsgroup string
setHost
public void setHost(String host)
Sets the hostname of the news server.
setNewsgroup
public void setNewsgroup(String newsgroup)
Sets the newsgroup.
newsgroup
- the newsgroup
toString
public String toString()
Returns an RFC 1036 string representation of this address.
- toString in interface Address
toString
public static String toString(Address[] addresses)
Converts the given array of NewsAddresses into a comma-separated
sequence of address strings.
The resulting string contains only US-ASCII characters, and is
therefore mail-safe.
addresses
- the NewsAddress objects
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved