|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.internet.InternetHeaders
Class that represents the RFC822 headers associated with a message.
Constructor Summary | |
InternetHeaders()
Create an empty InternetHeaders |
|
InternetHeaders(java.io.InputStream in)
Create a new InternetHeaders initialized by reading headers from the stream. |
Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
Add a new value to the header with the supplied name. |
void |
addHeaderLine(java.lang.String line)
Add an RFC822 header line to the header store. |
java.util.Enumeration |
getAllHeaderLines()
Return all the header lines as an Enumeration of Strings. |
java.util.Enumeration |
getAllHeaders()
Return all headers. |
java.lang.String[] |
getHeader(java.lang.String name)
Return all the values for the specified header. |
java.lang.String |
getHeader(java.lang.String name,
java.lang.String delimiter)
Return the values for the specified header as a single String. |
java.util.Enumeration |
getMatchingHeaderLines(java.lang.String[] names)
Return all matching header lines as an Enumeration of Strings. |
java.util.Enumeration |
getMatchingHeaders(java.lang.String[] names)
Return all matching Header objects. |
java.util.Enumeration |
getNonMatchingHeaderLines(java.lang.String[] names)
Return all non-matching header lines. |
java.util.Enumeration |
getNonMatchingHeaders(java.lang.String[] names)
Return all non matching Header objects. |
void |
load(java.io.InputStream in)
Read and parse the supplied stream and add all headers to the current set. |
void |
removeHeader(java.lang.String name)
Remove all header entries with the supplied name |
void |
setHeader(java.lang.String name,
java.lang.String value)
Set the value of the header to the supplied value; any existing headers are removed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InternetHeaders()
public InternetHeaders(java.io.InputStream in) throws MessagingException
in
- the RFC822 input stream to load from
MessagingException
- if there is a problem pasring the streamMethod Detail |
public void load(java.io.InputStream in) throws MessagingException
in
- the RFC822 input stream to load from
MessagingException
- if there is a problem pasring the streampublic java.lang.String[] getHeader(java.lang.String name)
name
- the header to return
public java.lang.String getHeader(java.lang.String name, java.lang.String delimiter)
name
- the header to returndelimiter
- the delimiter used in concatenation
public void setHeader(java.lang.String name, java.lang.String value)
name
- the name of the headervalue
- the new valuepublic void addHeader(java.lang.String name, java.lang.String value)
name
- the name of the header to add a new value forvalue
- another valuepublic void removeHeader(java.lang.String name)
name
- the header to removepublic java.util.Enumeration getAllHeaders()
public java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
public void addHeaderLine(java.lang.String line)
line
- raw RFC822 header linepublic java.util.Enumeration getAllHeaderLines()
public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names)
public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |