javax.mail.internet
public class InternetHeaders extends Object
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) |
Enumeration | getAllHeaderLines() |
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) |
Enumeration | getMatchingHeaders(String[] names) |
Enumeration | getNonMatchingHeaderLines(String[] names) |
Enumeration | getNonMatchingHeaders(String[] names) |
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.
|
Parameters: in the RFC822 input stream to load from
Throws: MessagingException if there is a problem pasring the stream
Parameters: name the name of the header to add a new value for value another value
Returns: an Enumeration
Parameters: name the header to return
Returns: the values for that header, or null if the header is not present
Parameters: name the header to return delimiter the delimiter used in concatenation
Returns: the header as a single String
Parameters: in the RFC822 input stream to load from
Throws: MessagingException if there is a problem pasring the stream
Parameters: name the header to remove
Parameters: name the name of the header value the new value