Home » apache-tomcat-6.0.26-src » javax » mail » internet » [javadoc | source]
javax.mail.internet
public class: NewsAddress [javadoc | source]
java.lang.Object
   javax.mail.Address
      javax.mail.internet.NewsAddress

All Implemented Interfaces:
    Serializable

This class models an RFC1036 newsgroup address.
Field Summary
protected  String newsgroup     
protected  String host     
Constructor:
 public NewsAddress() 
 public NewsAddress(String newsgroup) 
    Construct a NewsAddress with the given newsgroup.
    Parameters:
    newsgroup - the newsgroup
 public NewsAddress(String newsgroup,
    String host) 
    Construct a NewsAddress with the given newsgroup and host.
    Parameters:
    newsgroup - the newsgroup
    host - the host
Method from javax.mail.internet.NewsAddress Summary:
equals,   getHost,   getNewsgroup,   getType,   hashCode,   parse,   setHost,   setNewsgroup,   toString,   toString
Methods from javax.mail.Address:
equals,   getType,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.mail.internet.NewsAddress Detail:
 public boolean equals(Object a) 
    The equality operator.
 public String getHost() 
    Get the host.
 public String getNewsgroup() 
    Get the newsgroup.
 public String getType() 
    Return the type of this address. The type of a NewsAddress is "news".
 public int hashCode() 
    Compute a hash code for the address.
 public static NewsAddress[] parse(String newsgroups) throws AddressException 
    Parse the given comma separated sequence of newsgroup into NewsAddress objects.
 public  void setHost(String host) 
    Set the host.
 public  void setNewsgroup(String newsgroup) 
    Set the newsgroup.
 public String toString() 
    Convert this address into a RFC 1036 address.
 public static String toString(Address[] addresses) 
    Convert the given array of NewsAddress objects into a comma separated sequence of address strings. The resulting string contains only US-ASCII characters, and hence is mail-safe.