|
||||||||||||
| 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
An RFC 1036 newsgroup address.
| Field Summary | |
|---|---|
protected java.lang.String |
host
The hostname of the news server. |
protected java.lang.String |
newsgroup
The name of the newsgroup. |
| Constructor Summary | |
|---|---|
NewsAddress()
Constructor for an empty news address. |
|
NewsAddress(java.lang.String newsgroup)
Constructor with the given newsgroup. |
|
NewsAddress(java.lang.String newsgroup,
java.lang.String host)
Constructor with the given newsgroup and host. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object a)
|
java.lang.String |
getHost()
Returns the hostname of the news server. |
java.lang.String |
getNewsgroup()
Returns the newsgroup. |
java.lang.String |
getType()
Returns the type of this address. |
int |
hashCode()
|
static NewsAddress[] |
parse(java.lang.String newsgroups)
Parses the given comma-separated sequence of newsgroups into NewsAddresses. |
void |
setHost(java.lang.String host)
Sets the hostname of the news server. |
void |
setNewsgroup(java.lang.String newsgroup)
Sets the newsgroup. |
java.lang.String |
toString()
Returns an RFC 1036 string representation of this address. |
static java.lang.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 java.lang.String newsgroup
protected java.lang.String host
| Constructor Detail |
public NewsAddress()
public NewsAddress(java.lang.String newsgroup)
newsgroup - the newsgroup
public NewsAddress(java.lang.String newsgroup,
java.lang.String host)
newsgroup - the newsgrouphost - the host| Method Detail |
public java.lang.String getType()
NewsAddress is "news".
getType in class Addresspublic void setNewsgroup(java.lang.String newsgroup)
newsgroup - the newsgrouppublic java.lang.String getNewsgroup()
public void setHost(java.lang.String host)
host - the host namepublic java.lang.String getHost()
public java.lang.String toString()
toString in class Addresspublic boolean equals(java.lang.Object a)
equals in class Addresspublic int hashCode()
public static java.lang.String toString(Address[] addresses)
addresses - the NewsAddress objects
java.lang.ClassCastException - if any of the specified addresses
is not a NewsAddress
public static NewsAddress[] parse(java.lang.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 | |||||||||||