|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Address javax.mail.internet.NewsAddress
public class NewsAddress
This class models an RFC1036 newsgroup address.
Field Summary | |
---|---|
protected String |
host
|
protected String |
newsgroup
|
Constructor Summary | |
---|---|
NewsAddress()
Default constructor. |
|
NewsAddress(String newsgroup)
Construct a NewsAddress with the given newsgroup. |
|
NewsAddress(String newsgroup,
String host)
Construct a NewsAddress with the given newsgroup and host. |
Method Summary | |
---|---|
boolean |
equals(Object a)
The equality operator. |
String |
getHost()
Get the host. |
String |
getNewsgroup()
Get the newsgroup. |
String |
getType()
Return the type of this address. |
int |
hashCode()
Compute a hash code for the address. |
static NewsAddress[] |
parse(String newsgroups)
Parse the given comma separated sequence of newsgroup into NewsAddress objects. |
void |
setHost(String host)
Set the host. |
void |
setNewsgroup(String newsgroup)
Set the newsgroup. |
String |
toString()
Convert this address into a RFC 1036 address. |
static String |
toString(Address[] addresses)
Convert the given array of NewsAddress objects 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 newsgrouppublic NewsAddress(String newsgroup, String host)
newsgroup
- the newsgrouphost
- the hostMethod Detail |
---|
public String getType()
InternetAddress
public void setNewsgroup(String newsgroup)
newsgroup
- the newsgrouppublic String getNewsgroup()
public void setHost(String host)
host
- the hostpublic String getHost()
public String toString()
public boolean equals(Object a)
public int hashCode()
public static String toString(Address[] addresses)
addresses
- array of NewsAddress objects
ClassCastException,
- if any address object in the
given array is not a NewsAddress objects. Note
that this is a RuntimeException.public static NewsAddress[] parse(String newsgroups) throws AddressException
newsgroups
- comma separated newsgroup string
AddressException
- if the parse failed
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.