Movatterモバイル変換


[0]ホーム

URL:


         


Class NewsAddress

java.lang.Object  |  +--javax.mail.Address        |        +--javax.mail.internet.NewsAddress

public classNewsAddress
extendsAddress

This class models an RFC1036 newsgroup address.


host
           
newsgroup
           
 
NewsAddress()
          Default constructor.
NewsAddress(java.lang.String newsgroup)
          Construct a NewsAddress with the given newsgroup.
NewsAddress(java.lang.String newsgroup, java.lang.String host)
          Construct a NewsAddress with the given newsgroup and host.
 
equals(java.lang.Object a)
          The equality operator.
getHost()
          Get the host.
getNewsgroup()
          Get the newsgroup.
getType()
          Return the type of this address.
hashCode()
          Compute a hash code for the address.
parse(java.lang.String newsgroups)
          Parse the given comma separated sequence of newsgroup into NewsAddress objects.
setHost(java.lang.String host)
          Set the host.
setNewsgroup(java.lang.String newsgroup)
          Set the newsgroup.
toString()
          Convert this address into a RFC 1036 address.
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
 

newsgroup

protected java.lang.Stringnewsgroup

host

protected java.lang.Stringhost

NewsAddress

publicNewsAddress()
Default constructor.

NewsAddress

publicNewsAddress(java.lang.String newsgroup)
Construct a NewsAddress with the given newsgroup.
Parameters:
newsgroup - the newsgroup

NewsAddress

publicNewsAddress(java.lang.String newsgroup,                   java.lang.String host)
Construct a NewsAddress with the given newsgroup and host.
Parameters:
newsgroup - the newsgroup
host - the host

getType

public java.lang.StringgetType()
Return the type of this address. The type of a NewsAddress is "news".
Overrides:
getType in classAddress
Following copied from class:javax.mail.Address
Returns:
address type
See Also:
InternetAddress

setNewsgroup

public voidsetNewsgroup(java.lang.String newsgroup)
Set the newsgroup.
Parameters:
newsgroup - the newsgroup

getNewsgroup

public java.lang.StringgetNewsgroup()
Get the newsgroup.
Returns:
newsgroup

setHost

public voidsetHost(java.lang.String host)
Set the host.
Parameters:
host - the host

getHost

public java.lang.StringgetHost()
Get the host.
Returns:
host

toString

public java.lang.StringtoString()
Convert this address into a RFC 1036 address.
Overrides:
toString in classAddress
Returns:
newsgroup

equals

public booleanequals(java.lang.Object a)
The equality operator.
Overrides:
equals in classAddress
Following copied from class:javax.mail.Address
Parameters:
address - Address object

hashCode

public inthashCode()
Compute a hash code for the address.
Overrides:
hashCode in classjava.lang.Object

toString

public static java.lang.StringtoString(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.
Parameters:
addresses - array of NewsAddress objects
Returns:
comma separated address strings
Throws:
ClassCastException, - if any address object in the given array is not a NewsAddress objects. Note that this is a RuntimeException.

parse

public staticNewsAddress[]parse(java.lang.String newsgroups)                           throwsAddressException
Parse the given comma separated sequence of newsgroup into NewsAddress objects.
Parameters:
newsgroups - comma separated newsgroup string
Returns:
array of NewsAddress objects
Throws:
AddressException - if the parse failed

         


[8]ページ先頭

©2009-2025 Movatter.jp