javax.mail.internet
public class NewsAddress extends Address
Version: 1.4
Field Summary | |
---|---|
protected String | host
The hostname of the news server. |
protected String | newsgroup
The name of the newsgroup. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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.
|
Parameters: newsgroup the newsgroup
Parameters: newsgroup the newsgroup host the host
NewsAddress
is "news".Parameters: newsgroups a comma-separated newsgroup string
Throws: AddressException if the parse failed
Parameters: host the host name
Parameters: newsgroup the newsgroup
Parameters: addresses the NewsAddress objects
Throws: ClassCastException if any of the specified addresses is not a NewsAddress