You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

All Packages  This Package  Class Hierarchy  Class Search  Index



This class lets you instantiate an address list object from an input string (usually the right hand side to a To: field). You can then detect if they were all valid addresses, or there was some error. You can also access the individual address string to send the address list back out again.

public class  RFC822AddressList
     extends java.lang.Object
          // Fields 2
     Vector all_tokens;
     RFC822AddressParser parser;

          // Constructors 2
     public RFC822AddressList(String);

          // Methods 4
     public String getAddressString(int);
     public String getErrorString();
     public boolean isError();
     public int size();



   RFC822AddressParser parser


   Vector all_tokens




This constructor seems to be needed in order to subclass this class. It should never be directly called as it will create a null and basically useless address list.


   public RFC822AddressList(String str) 

The input string (usually a To: field) is first tokenized, and then parsed into a list of addresses.



   public int size() 

Returns the number of addresses in the list. The string representation for each address is indexed from 0 to (size - 1). A return of 0 means an empty address list, probably a result of an error in parsing.


   public String getAddressString(int indx) 

Parameter Description
indx an index from 0 to (size - 1).

Either a String representation of the address, or null if the indx is outside the list. Also returns null is there was an error which resulted in no address list.


   public boolean isError() 

Were there errors in tokenizing and parsing this string?


   public String getErrorString() 

A string describing the error if there was one. Some errors can return an empty string. No error in the address list returns "No error."

All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4