|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Header
A header of an MIME entity (as defined in RFC 2045).
Method Summary | |
---|---|
void |
addField(Field field)
Adds a field to the end of the list of fields. |
Field |
getField(java.lang.String name)
Gets a Field given a field name. |
java.util.List<Field> |
getFields()
Gets the fields of this header. |
java.util.List<Field> |
getFields(java.lang.String name)
Gets all Field s having the specified field name. |
java.util.Iterator<Field> |
iterator()
Returns an iterator over the list of fields of this header. |
int |
removeFields(java.lang.String name)
Removes all Field s having the specified field name. |
void |
setField(Field field)
Sets or replaces a field. |
Method Detail |
---|
void addField(Field field)
field
- the field to add.java.util.List<Field> getFields()
Field
objects.Field getField(java.lang.String name)
Field
given a field name. If there are multiple
such fields defined in this header the first one will be returned.
name
- the field name (e.g. From, Subject).
null
if none found.java.util.List<Field> getFields(java.lang.String name)
Field
s having the specified field name.
name
- the field name (e.g. From, Subject).
java.util.Iterator<Field> iterator()
iterator
in interface java.lang.Iterable<Field>
int removeFields(java.lang.String name)
Field
s having the specified field name.
name
- the field name (e.g. From, Subject).
void setField(Field field)
Header
does not already contain a header field of
the same name as the given field then it is added to the end of the list
of fields (same behavior as addField(Field)
). Otherwise the
first occurrence of a field with the same name is replaced by the given
field and all further occurrences are removed.
field
- the field to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |