HttpMessage.
Concrete instances of this class are most easily obtained from its default factory:
DefaultHttpHeadersFactory#headersFactory().
| Modifier and Type | Class and Description |
|---|---|
| public static class | HttpHeaders.Names
Deprecated
Use
HttpHeaderNames instead.
Standard HTTP header names.
|
| public static class | HttpHeaders.Values
Deprecated
Use
HttpHeaderValues instead.
Standard HTTP header values.
|
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpHeaders | EMPTY_HEADERS
Deprecated
Use
EmptyHttpHeaders#INSTANCE.
|
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract HttpHeaders | |
| public HttpHeaders | Returns: thisThe name of the header being added name, Object The value of the header being added value)Adds a new header with the specified name and value. |
| public abstract HttpHeaders | |
| public HttpHeaders | Returns: thisThe name of the headers being set name, Iterable<?> The values of the headers being set values)Adds a new header with the specified name and values. |
| public HttpHeaders | |
| public static void | addDateHeader(HttpMessage message, String name, Date value)
Deprecated
Use
add(CharSequence, Object) instead.
|
| public static void | addDateHeader(HttpMessage message, CharSequence name, Date value)
Deprecated
Use
add(CharSequence, Object) instead.
|
| public static void | addHeader(HttpMessage message, String name, Object value)
Deprecated
Use
add(CharSequence, Object) instead.
|
| public static void | addHeader(HttpMessage message, CharSequence name, Object value)
Deprecated
Use
add(CharSequence, Object) instead.
|
| public abstract HttpHeaders | |
| public static void | addIntHeader(HttpMessage message, String name, int value)
Deprecated
Use
add(CharSequence, Iterable) instead.
|
| public static void | addIntHeader(HttpMessage message, CharSequence name, int value)
Deprecated
Use
addInt(CharSequence, int) instead.
Adds a new integer header with the specified name and value.
|
| public abstract HttpHeaders | Returns: thisThe name to modify name, short The value value)Add the |
| public abstract HttpHeaders | |
| public static void | clearHeaders(HttpMessage message)
Deprecated
Use
clear() instead.
Removes all headers from the specified message.
|
| public abstract boolean | |
| public boolean | Returns: True if at least one header is foundThe name of the header to search for name)Checks to see if there is a header with the specified name |
| public boolean | |
| public boolean | contains(CharSequence
the name of the header to find name, CharSequence the value of the header to find value, boolean true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.Returns |
| private static boolean | |
| public boolean | containsValue(CharSequence
the name of the header to find name, CharSequence the value of the header to find value, boolean true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.Returns |
| public HttpHeaders | |
| public static void | |
| public abstract List | |
| public static boolean | equalsIgnoreCase(CharSequence name1, CharSequence name2)
Deprecated
Use
AsciiString#contentEqualsIgnoreCase(CharSequence, CharSequence) instead.
|
| public abstract String | |
| public String | Returns: The first header value ornull if there is no such headerThe name of the header to search name)Returns the value of a header with the specified name. |
| public String | Returns: The first header value ordefaultValue if there is no such headerThe name of the header to search name, String defaultValue)Returns the value of a header with the specified name. |
| public abstract List | |
| public List | Returns: AList of header values which will be empty if no values
are foundThe name of the headers to search name)Returns the values of headers with the specified name |
| public final List | getAllAsString(CharSequence
the name of the header to retrieve name)
|
| public final String | Returns: the first header value if the header is found.null if there's no such header.the name of the header to retrieve name)
|
| public static long | Returns: the content length
Deprecated
Use
HttpUtil#getContentLength(HttpMessage) instead.
|
| public static long | Returns: the content length ordefaultValue if this message does
not have the "Content-Length" header or its value is not
a number
Deprecated
Use
HttpUtil#getContentLength(HttpMessage, long) instead.
|
| public static Date | getDate(HttpMessage message)
Deprecated
Use
getTimeMillis(CharSequence) instead.
Returns the value of the "Date" header.
|
| public static Date | getDate(HttpMessage message, Date defaultValue)
Deprecated
Use
getTimeMillis(CharSequence, long) instead.
|
| public static Date | |
| public static Date | Returns: the header value
Deprecated
Use
getTimeMillis(CharSequence) instead.
|
| public static Date | getDateHeader(HttpMessage message, String name, Date defaultValue)
Deprecated
Use
getTimeMillis(CharSequence, long) instead.
|
| public static Date | Returns: the header value or thedefaultValue if there is no such
header or the header value is not a formatted date
Deprecated
Use
getTimeMillis(CharSequence, long) instead.
|
| public static String | |
| public static String | Returns: the header value ornull if there is no such header
Deprecated
Use
get(CharSequence) instead.
|
| public static String | getHeader(HttpMessage message, String name, String defaultValue)
Deprecated
Use
get(CharSequence, String) instead.
|
| public static String | Returns: the header value or thedefaultValue if there is no such
header
Deprecated
Use
get(CharSequence, String) instead.
|
| public static String | getHost(HttpMessage message)
Deprecated
Use
get(CharSequence) instead.
Returns the value of the "Host" header.
|
| public static String | |
| public abstract Integer | Returns: the first header value if the header is found and its value is an integer.null if there's no
such header or its value is not an integer.the name of the header to search name)Returns the integer value of a header with the specified name. |
| public abstract int | Returns: the first header value if the header is found and its value is an integer.defaultValue if
there's no such header or its value is not an integer.the name of the header to search name, int the default value defaultValue)Returns the integer value of a header with the specified name. |
| public static int | |
| public static int | Returns: the header value
Deprecated
Use
getInt(CharSequence) instead.
|
| public static int | getIntHeader(HttpMessage message, String name, int defaultValue)
Deprecated
Use
getInt(CharSequence, int) instead.
|
| public static int | Returns: the header value or thedefaultValue if there is no such
header or the header value is not a number
Deprecated
Use
getInt(CharSequence, int) instead.
|
| public abstract Short | Returns: the first header value if the header is found and its value is a short.null if there's no
such header or its value is not a short.the name of the header to search name)Returns the short value of a header with the specified name. |
| public abstract short | Returns: the first header value if the header is found and its value is a short.defaultValue if
there's no such header or its value is not a short.the name of the header to search name, short the default value defaultValue)Returns the short value of a header with the specified name. |
| public abstract Long | Returns: the first header value if the header is found and its value is a date.null if there's no
such header or its value is not a date.the name of the header to search name)Returns the date value of a header with the specified name. |
| public abstract long | Returns: the first header value if the header is found and its value is a date.defaultValue if
there's no such header or its value is not a date.the name of the header to search name, long the default value defaultValue)Returns the date value of a header with the specified name. |
| public static boolean | is100ContinueExpected(HttpMessage message)
Deprecated
Use
HttpUtil#is100ContinueExpected(HttpMessage) instead.
|
| public static boolean | |
| public abstract boolean | |
| public static boolean | |
| public static boolean | Returns: True if transfer encoding is chunked, otherwise falseThe message to check message)
Deprecated
Use
HttpUtil#isTransferEncodingChunked(HttpMessage) instead.
|
| public abstract Iterator | iterator()
Redeclares java.
Deprecated
It is preferred to use
Returns an iterator over elements of type iteratorCharSequence() unless you need String.
T.
|
| public final Iterator | |
| public abstract Iterator | |
| public abstract Set | |
| public static CharSequence | |
| public abstract HttpHeaders | |
| public HttpHeaders | Returns: thisThe name of the header to remove name)Removes the header with the specified name. |
| public static void | |
| public static void | removeHeader(HttpMessage message, CharSequence name)
Deprecated
Use
remove(CharSequence) instead.
Removes the header with the specified name.
|
| public static void | removeTransferEncodingChunked(HttpMessage m)
Deprecated
Use
HttpUtil#setTransferEncodingChunked(HttpMessage, boolean) instead.
|
| public abstract HttpHeaders | |
| public HttpHeaders | Returns: thisThe name of the header being set name, Object The value of the header being set value)Sets a header with the specified name and value. |
| public abstract HttpHeaders | |
| public HttpHeaders | Returns: thisThe name of the headers being set name, Iterable<?> The values of the headers being set values)Sets a header with the specified name and values. |
| public HttpHeaders | Returns: thisCleans the current header entries and copies all header entries of the specified |
| public static void | set100ContinueExpected(HttpMessage message)
Deprecated
Use
HttpUtil#set100ContinueExpected(HttpMessage, boolean) instead.
|
| public static void | set100ContinueExpected(HttpMessage message, boolean set)
Deprecated
Use
HttpUtil#set100ContinueExpected(HttpMessage, boolean) instead.
|
| public HttpHeaders | Returns: thisThe headers used to headers)set(String, Object) values in this instanceRetains all current headers but calls |
| public static void | setContentLength(HttpMessage message, long length)
Deprecated
Use
HttpUtil#setContentLength(HttpMessage, long) instead.
|
| public static void | setDate(HttpMessage message, Date value)
Deprecated
Use
set(CharSequence, Object) instead.
Sets the "Date" header.
|
| public static void | setDateHeader(HttpMessage message, String name, Date value)
Deprecated
Use
set(CharSequence, Object) instead.
|
| public static void | setDateHeader(HttpMessage message, CharSequence name, Date value)
Deprecated
Use
set(CharSequence, Object) instead.
|
| public static void | setDateHeader(HttpMessage message, String name, Iterable<Date> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | setDateHeader(HttpMessage message, CharSequence name, Iterable<Date> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | setHeader(HttpMessage message, String name, Object value)
Deprecated
Use
set(CharSequence, Object) instead.
|
| public static void | setHeader(HttpMessage message, CharSequence name, Object value)
Deprecated
Use
set(CharSequence, Object) instead.
|
| public static void | setHeader(HttpMessage message, String name, Iterable<?> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | setHeader(HttpMessage message, CharSequence name, Iterable<?> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | |
| public static void | setHost(HttpMessage message, CharSequence value)
Deprecated
Use
set(CharSequence, Object) instead.
Sets the "Host" header.
|
| public abstract HttpHeaders | |
| public static void | setIntHeader(HttpMessage message, String name, int value)
Deprecated
Use
setInt(CharSequence, int) instead.
|
| public static void | setIntHeader(HttpMessage message, CharSequence name, int value)
Deprecated
Use
setInt(CharSequence, int) instead.
|
| public static void | setIntHeader(HttpMessage message, String name, Iterable<Integer> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | setIntHeader(HttpMessage message, CharSequence name, Iterable<Integer> values)
Deprecated
Use
set(CharSequence, Iterable) instead.
|
| public static void | setKeepAlive(HttpMessage message, boolean keepAlive)
Deprecated
Use
HttpUtil#setKeepAlive(HttpMessage, boolean) instead.
|
| public abstract HttpHeaders | Returns: thisThe name to modify name, short The value value)Set the |
| public static void | setTransferEncodingChunked(HttpMessage m)
Deprecated
Use
HttpUtil#setTransferEncodingChunked(HttpMessage, boolean) instead.
|
| public abstract int | |
| public String | |
| public Iterator | valueCharSequenceIterator(CharSequence
the name of the header to retrieve name)Equivalent to |
| public Iterator | valueStringIterator(CharSequence
the name of the header to retrieve name)Equivalent to |