|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.servlet.mail.MailHeaders
This interface defines a container for mail headers. Each header must use MIME format:
name: value.
Constructor Summary | |
MailHeaders()
|
Method Summary | |
java.util.Date |
getDate()
Returns the date associated with the mail message using standard date format. |
java.util.Date |
getDate(java.lang.String format)
Returns the date associated with the mail message using given date format. |
abstract java.lang.String |
getHeader(java.lang.String name)
Get the header value associated with the given name. |
abstract java.util.Enumeration |
getHeaderNames()
Returns the list of all header names. |
abstract java.lang.String[] |
getHeaderValues(java.lang.String name)
Get the header values associated with the given name. |
MailAddress |
getReplyTo()
Returns the mail address associated to the reply-to field. |
java.lang.String |
getSubject()
Returns the subject of the mail message. |
void |
removeHeader(java.lang.String name)
Removes all headers associated with the specified name. |
abstract void |
removeHeader(java.lang.String name,
java.lang.String value)
Removes the header with specified name and value. |
void |
setDate(java.util.Date date)
Sets the date using standard date format. |
void |
setDate(java.util.Date date,
java.lang.String format)
Sets the date using given date format. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets the value of the header specified by name. |
abstract void |
setHeader(java.lang.String name,
java.lang.String value,
boolean overwrite)
Sets the value of the header specified by name. |
void |
setReplyTo(MailAddress replyto)
Sets the mail address that should be used as the reply address. |
void |
setSubject(java.lang.String subject)
Sets the subject of the mail message. |
java.lang.String |
toString()
Creates a string representation of this container. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public MailHeaders()
Method Detail |
public abstract java.lang.String getHeader(java.lang.String name)
public abstract java.lang.String[] getHeaderValues(java.lang.String name)
public abstract java.util.Enumeration getHeaderNames()
public void setHeader(java.lang.String name, java.lang.String value)
public abstract void setHeader(java.lang.String name, java.lang.String value, boolean overwrite)
public void removeHeader(java.lang.String name)
public abstract void removeHeader(java.lang.String name, java.lang.String value)
public java.lang.String toString()
public java.util.Date getDate() throws java.text.ParseException
public java.util.Date getDate(java.lang.String format) throws java.text.ParseException
public void setDate(java.util.Date date)
public void setDate(java.util.Date date, java.lang.String format)
public MailAddress getReplyTo()
public void setReplyTo(MailAddress replyto)
public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |