|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

public interface IHeader
Header definition
| Method Summary | |
|---|---|
void |
addHeader(String headername,
String headervalue)
Adds a header with the given name and value. |
void |
addHeaderLine(String line)
adds a raw header line |
void |
addHeaderlines(String... lines)
adds raw header lines |
boolean |
containsHeader(String headername)
Returns a boolean indicating whether the named header has already been set. |
String |
getCharacterEncoding()
Returns the name of the character encoding used in the body of this message. |
String |
getContentType()
Returns the MIME type of the body of the messag, or null if the type is not known. |
String |
getDisposition()
returns the content disposition header of the part, or null if the type is not known. |
String |
getDispositionParam(String name)
returns the content disposition param value or null if not setsee also rfc2183 |
String |
getDispositionType()
returns the content disposition type or null if not setsee also rfc2183 |
String |
getHeader(String headername)
Returns the value of the specified header as a String. |
String |
getHeader(String headername,
String dfltValue)
Returns the value of the specified header as a String. |
List<String> |
getHeaderList(String headername)
Returns all the values of the specified header as an List of String objects. |
Enumeration |
getHeaderNames()
Returns an enumeration of all the header names. |
Set<String> |
getHeaderNameSet()
Returns an set of all the header names. |
Enumeration |
getHeaders(String headername)
Returns all the values of the specified header as an Enumeration of String objects. |
String |
getTransferEncoding()
returns the Transfer-Encoding header parameter or null if the header is not set |
void |
removeHeader(String headername)
removes a header with the given name |
void |
setContentType(String type)
sets the MIME type of the body of the part |
void |
setHeader(String headername,
String headervalue)
Sets a header with the given name and value. |
void |
setTransferEncoding(String transferEncoding)
sets the Transfer-Encoding parameter |
| Method Detail |
|---|
void addHeader(String headername,
String headervalue)
headername - the name of the headerheadervalue - the additional header value. If it contains octet string, it should be encoded
according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
void setHeader(String headername,
String headervalue)
headername - the name of the headerheadervalue - the header value If it contains octet string,
it should be encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)void removeHeader(String headername)
headername - the name of the headerboolean containsHeader(String headername)
name - the header name
true if the named header has already been set; false otherwiseSet<String> getHeaderNameSet()
Enumeration getHeaderNames()
List<String> getHeaderList(String headername)
List of String objects.
Some headers, such as Accept-Language can be set
by part producer as several headers each with a different value rather than
sending the header as a comma separated list.
headername - a String specifying the header name
List containing the values of the requested header.
If the part does not have any headers of that name return an empty enumeration.Enumeration getHeaders(String headername)
Enumeration of String objects.
Some headers, such as Accept-Language can be set
by part producer as several headers each with a different value rather than
sending the header as a comma separated list.
headername - a String specifying the header name
Enumeration containing the values of the requested header.
If the part does not have any headers of that name return an empty enumeration.void addHeaderlines(String... lines)
lines - the headerlinesvoid addHeaderLine(String line)
line - the headerlineString getHeader(String headername)
String.
If the part did not include a header of the specified name,
this method returns null.
If there are multiple headers with the same name, this method
returns the first head in the part.
headername - a String specifying the header name
String containing the value of the
requested header, or null if the part
does not have a header of that name
String getHeader(String headername,
String dfltValue)
String.
If the part did not include a header of the specified name,
this method returns null.
If there are multiple headers with the same name, this method
returns the first head in the part.
headername - a String specifying the header namedfltValue - the default value if the header is not set
String containing the value of the
requested header, or null if the part
does not have a header of that namevoid setContentType(String type)
type - the MIME type of the body of the partString getContentType()
null if the type is not known.
String containing the name of the MIME type of
the message, or null if the type is not knownString getCharacterEncoding()
String containing the name of the character encodingString getDisposition()
null if the type is not known.
String containing the name of the content disposition of
the part, or null if the type is not knownString getDispositionType()
null if not set
null if not setString getDispositionParam(String name)
null if not set
name - the parameter name
null if not setString getTransferEncoding()
null if the header is not set
null if the header is not setvoid setTransferEncoding(String transferEncoding)
transferEncoding - the Transfer-Encoding parameter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||