|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.Address
javax.mail.internet.NewsAddress
public class NewsAddress
An RFC 1036 newsgroup address.
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String newsgroup
protected String host
| Constructor Detail |
|---|
public NewsAddress()
public NewsAddress(String newsgroup)
newsgroup - the newsgroup
public NewsAddress(String newsgroup,
String host)
newsgroup - the newsgrouphost - the host| Method Detail |
|---|
public String getType()
NewsAddress is "news".
getType in class Addresspublic void setNewsgroup(String newsgroup)
newsgroup - the newsgrouppublic String getNewsgroup()
public void setHost(String host)
host - the host namepublic String getHost()
public String toString()
toString in class Addresspublic boolean equals(Object a)
equals in class Addresspublic int hashCode()
hashCode in class Objectpublic static String toString(Address[] addresses)
addresses - the NewsAddress objects
ClassCastException - if any of the specified addresses
is not a NewsAddress
public static NewsAddress[] parse(String newsgroups)
throws AddressException
newsgroups - a comma-separated newsgroup string
AddressException - if the parse failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||