| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.internet.InternetHeaders
public class InternetHeaders
Class that represents the RFC822 headers associated with a message.
| Nested Class Summary | |
|---|---|
protected static class | 
InternetHeaders.InternetHeader
 | 
| Field Summary | |
|---|---|
protected  List | 
headers
 | 
| Constructor Summary | |
|---|---|
InternetHeaders()
Create an empty InternetHeaders  | 
|
InternetHeaders(InputStream in)
Create a new InternetHeaders initialized by reading headers from the stream.  | 
|
| Method Summary | |
|---|---|
 void | 
addHeader(String name,
                   String value)
Add a new value to the header with the supplied name.  | 
 void | 
addHeaderLine(String line)
Add an RFC822 header line to the header store.  | 
 Enumeration | 
getAllHeaderLines()
Return all the header lines as an Enumeration of Strings.  | 
 Enumeration | 
getAllHeaders()
Return all headers.  | 
 String[] | 
getHeader(String name)
Return all the values for the specified header.  | 
 String | 
getHeader(String name,
                   String delimiter)
Return the values for the specified header as a single String.  | 
 Enumeration | 
getMatchingHeaderLines(String[] names)
Return all matching header lines as an Enumeration of Strings.  | 
 Enumeration | 
getMatchingHeaders(String[] names)
Return all matching Header objects.  | 
 Enumeration | 
getNonMatchingHeaderLines(String[] names)
Return all non-matching header lines.  | 
 Enumeration | 
getNonMatchingHeaders(String[] names)
Return all non matching Header objects.  | 
 void | 
load(InputStream in)
Read and parse the supplied stream and add all headers to the current set.  | 
 void | 
removeHeader(String name)
Remove all header entries with the supplied name  | 
 void | 
setHeader(String name,
                   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 | 
| Field Detail | 
|---|
protected List headers
| Constructor Detail | 
|---|
public InternetHeaders()
public InternetHeaders(InputStream in)
                throws MessagingException
in - the RFC822 input stream to load from
MessagingException - if there is a problem pasring the stream| Method Detail | 
|---|
public void load(InputStream in)
          throws MessagingException
in - the RFC822 input stream to load from
MessagingException - if there is a problem pasring the streampublic String[] getHeader(String name)
name - the header to return
public String getHeader(String name,
                        String delimiter)
name - the header to returndelimiter - the delimiter used in concatenation
public void setHeader(String name,
                      String value)
name - the name of the headervalue - the new value
public void addHeader(String name,
                      String value)
name - the name of the header to add a new value forvalue - another valuepublic void removeHeader(String name)
name - the header to removepublic Enumeration getAllHeaders()
public Enumeration getMatchingHeaders(String[] names)
public Enumeration getNonMatchingHeaders(String[] names)
public void addHeaderLine(String line)
line - raw RFC822 header linepublic Enumeration getAllHeaderLines()
public Enumeration getMatchingHeaderLines(String[] names)
public Enumeration getNonMatchingHeaderLines(String[] names)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||