SilverStream
Application Server 3.5

com.sssw.srv.mail
Class AgoRFC822HeaderFieldSet

java.lang.Object
 |
 +--com.sssw.srv.mail.AgoRFC822HeaderFieldSet

public class AgoRFC822HeaderFieldSet
extends Object

Class that stores a set of header fields (specifically AgoRFC822HeaderField objects). The AgoMIMEPart class uses this class to store the set of header fields associated with a MIME part.


Constructor Summary
AgoRFC822HeaderFieldSet()
          The constructor for the AgoRFC822HeaderFieldSet class.
 
Method Summary
 void add(AgoRFC822HeaderField headerfield)
          Adds a header field to the set.
 void add(String name, String body)
          Adds a new AgoRFC822HeaderFieldString header field to the set.
 int count()
          Returns the number of headers currently in the set.
 void delete(String name)
          Deletes the specified header from this header set.
 AgoRFC822HeaderField find(String name)
          Searches for and returns an AgoRFC822HeaderField object that matches a specified header name.
 AgoRFC822HeaderField get(int index)
          Returns a header field at a particular index in the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgoRFC822HeaderFieldSet

public AgoRFC822HeaderFieldSet()
The constructor for the AgoRFC822HeaderFieldSet class.
Example:
     AgoRFC822HeaderFieldSet fieldSet = new AgoRFC822HeaderFieldSet();
 
Method Detail

get

public AgoRFC822HeaderField get(int index)
Returns a header field at a particular index in the set.
Parameters:
index - specifies the index of the header field to obtain.
Usage:

The index is zero-based.

Example:

The following code returns the first header in the set.

     AgoRFC822HeaderField field = fieldSet.get(0);
 

add

public void add(AgoRFC822HeaderField headerfield)
Adds a header field to the set.
Parameters:
headerfield - the header field to add.
Example:
     AgoRFC822HeaderFieldString subject = new AgoRFC822HeaderFieldString();
     subject.setName("Subject");
     subject.setBody("Meeting Minutes");
     fieldSet.add(subject);
 
See Also:
AgoRFC822HeaderFieldSet.delete( String name )

add

public void add(String name,
                String body)
Adds a new AgoRFC822HeaderFieldString header field to the set.
Parameters:
name - the name of the header field.
body - the body of the header field.
Usage:

This is just a convenience routine to avoid having to explictly create the AgoRFC822HeaderFieldString object and calling the other version of the add() method.

Example:
     fieldSet.add("Subject","Meeting Minutes");
 
See Also:
AgoRFC822HeaderFieldSet.delete( String name )

find

public AgoRFC822HeaderField find(String name)
Searches for and returns an AgoRFC822HeaderField object that matches a specified header name.
Parameters:
name - the name of the header field to find.
Usage:

Header names are case insensitive.

Example:
     AgoRFC822HeaderField field = fieldSet.find("subject");
 
See Also:
AgoRFC822HeaderField

delete

public void delete(String name)
Deletes the specified header from this header set.
Parameters:
name - the name of the header to delete.
Usage:

Header names are case insensitive.

Example:
     fieldSet.delete("Subject");
 
See Also:
AgoRFC822HeaderFieldSet.add( AgoRFC822HeaderField headerfield )

count

public int count()
Returns the number of headers currently in the set.
Example:
     int i = fieldSet.count();
 

SilverStream
Application Server 3.5