|
|||||||||
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 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 newsgrouppublic NewsAddress(java.lang.String newsgroup, java.lang.String host)
newsgroup
- the newsgrouphost
- the hostMethod Detail |
---|
public java.lang.String getType()
NewsAddress
is "news".
getType
in class Address
public 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 Address
public boolean equals(java.lang.Object a)
equals
in class Address
public int hashCode()
hashCode
in class java.lang.Object
public static java.lang.String toString(Address[] addresses)
addresses
- the NewsAddress objects
java.lang.ClassCastException
- if any of the specified addresses
is not a NewsAddresspublic 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 |