public class DefaultHttpHeaders extends HttpHeaders
HttpHeaders.HttpHeaders.Names, HttpHeaders.ValuesEMPTY_HEADERS| Modifier | Constructor and Description |
|---|---|
|
DefaultHttpHeaders() |
|
DefaultHttpHeaders(boolean validate) |
protected |
DefaultHttpHeaders(boolean validate,
DefaultHeaders.NameValidator<CharSequence> nameValidator) |
protected |
DefaultHttpHeaders(DefaultHeaders<CharSequence> headers) |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
add(CharSequence name,
Iterable<?> values)
Deprecated.
|
HttpHeaders |
add(CharSequence name,
Object value)
Deprecated.
|
HttpHeaders |
add(HttpHeaders headers)
Adds all header entries of the specified
headers. |
HttpHeaders |
add(String name,
Iterable<?> values)
Deprecated.
|
HttpHeaders |
add(String name,
Object value)
Deprecated.
|
HttpHeaders |
addInt(CharSequence name,
int value)
Add the
name to value. |
HttpHeaders |
addShort(CharSequence name,
short value)
Add the
name to value. |
HttpHeaders |
clear()
Removes all headers from this
HttpMessage. |
boolean |
contains(CharSequence name)
Checks to see if there is a header with the specified name
|
boolean |
contains(CharSequence name,
CharSequence value,
boolean ignoreCase)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(String name)
Deprecated.
|
boolean |
contains(String name,
String value,
boolean ignoreCase) |
List<Map.Entry<String,String>> |
entries()
Deprecated.
|
boolean |
equals(Object o) |
String |
get(CharSequence name)
Deprecated.
|
String |
get(String name)
Deprecated.
|
List<String> |
getAll(CharSequence name)
Deprecated.
|
List<String> |
getAll(String name)
Deprecated.
|
Integer |
getInt(CharSequence name)
Returns the integer value of a header with the specified name.
|
int |
getInt(CharSequence name,
int defaultValue)
Returns the integer value of a header with the specified name.
|
Short |
getShort(CharSequence name)
Returns the short value of a header with the specified name.
|
short |
getShort(CharSequence name,
short defaultValue)
Returns the short value of a header with the specified name.
|
Long |
getTimeMillis(CharSequence name)
Returns the date value of a header with the specified name.
|
long |
getTimeMillis(CharSequence name,
long defaultValue)
Returns the date value of a header with the specified name.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if no header exists.
|
Iterator<Map.Entry<String,String>> |
iterator()
Deprecated.
|
Iterator<Map.Entry<CharSequence,CharSequence>> |
iteratorCharSequence()
Deprecated.
|
Set<String> |
names()
Deprecated.
|
HttpHeaders |
remove(CharSequence name)
Deprecated.
|
HttpHeaders |
remove(String name)
Deprecated.
|
HttpHeaders |
set(CharSequence name,
Iterable<?> values)
Deprecated.
|
HttpHeaders |
set(CharSequence name,
Object value)
Deprecated.
|
HttpHeaders |
set(HttpHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers. |
HttpHeaders |
set(String name,
Iterable<?> values)
Deprecated.
|
HttpHeaders |
set(String name,
Object value)
Deprecated.
|
HttpHeaders |
setInt(CharSequence name,
int value)
Set the
name to value. |
HttpHeaders |
setShort(CharSequence name,
short value)
Set the
name to value. |
int |
size()
Returns the number of headers in this object.
|
addDateHeader, addDateHeader, addHeader, addHeader, addIntHeader, addIntHeader, clearHeaders, encodeAscii, equalsIgnoreCase, get, getAllAsString, getAsString, getContentLength, getContentLength, getDate, getDate, getDateHeader, getDateHeader, getDateHeader, getDateHeader, getHeader, getHeader, getHeader, getHeader, getHost, getHost, getIntHeader, getIntHeader, getIntHeader, getIntHeader, is100ContinueExpected, isContentLengthSet, isKeepAlive, isTransferEncodingChunked, iteratorAsString, newEntity, removeHeader, removeHeader, removeTransferEncodingChunked, set100ContinueExpected, set100ContinueExpected, setAll, setContentLength, setDate, setDateHeader, setDateHeader, setDateHeader, setDateHeader, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntHeader, setIntHeader, setIntHeader, setIntHeader, setKeepAlive, setTransferEncodingChunkedpublic DefaultHttpHeaders()
public DefaultHttpHeaders(boolean validate)
protected DefaultHttpHeaders(boolean validate,
DefaultHeaders.NameValidator<CharSequence> nameValidator)
protected DefaultHttpHeaders(DefaultHeaders<CharSequence> headers)
public HttpHeaders add(HttpHeaders headers)
HttpHeadersheaders.add in class HttpHeadersthispublic HttpHeaders set(HttpHeaders headers)
HttpHeadersheaders.set in class HttpHeadersthis@Deprecated public HttpHeaders add(String name, Object value)
add in class HttpHeaders@Deprecated public HttpHeaders add(CharSequence name, Object value)
add in class HttpHeadersname - The name of the header being addedvalue - The value of the header being addedthis@Deprecated public HttpHeaders add(String name, Iterable<?> values)
add in class HttpHeaders@Deprecated public HttpHeaders add(CharSequence name, Iterable<?> values)
add in class HttpHeadersname - The name of the headers being setvalues - The values of the headers being setthispublic HttpHeaders addInt(CharSequence name, int value)
HttpHeadersname to value.addInt in class HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders addShort(CharSequence name, short value)
HttpHeadersname to value.addShort in class HttpHeadersname - The name to modifyvalue - The valuethis@Deprecated public HttpHeaders remove(String name)
remove in class HttpHeaders@Deprecated public HttpHeaders remove(CharSequence name)
remove in class HttpHeadersname - The name of the header to removethis@Deprecated public HttpHeaders set(String name, Object value)
set in class HttpHeaders@Deprecated public HttpHeaders set(CharSequence name, Object value)
set in class HttpHeadersname - The name of the header being setvalue - The value of the header being setthis@Deprecated public HttpHeaders set(String name, Iterable<?> values)
set in class HttpHeaders@Deprecated public HttpHeaders set(CharSequence name, Iterable<?> values)
set in class HttpHeadersname - The name of the headers being setvalues - The values of the headers being setthispublic HttpHeaders setInt(CharSequence name, int value)
HttpHeadersname to value. This will remove all previous values associated with name.setInt in class HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders setShort(CharSequence name, short value)
HttpHeadersname to value. This will remove all previous values associated with name.setShort in class HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders clear()
HttpHeadersHttpMessage.clear in class HttpHeadersthis@Deprecated public String get(String name)
get in class HttpHeaders#get(CharSequence)}@Deprecated public String get(CharSequence name)
get in class HttpHeadersname - The name of the header to searchnull if there is no such headerpublic Integer getInt(CharSequence name)
HttpHeadersgetInt in class HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not an integer.public int getInt(CharSequence name, int defaultValue)
HttpHeadersgetInt in class HttpHeadersname - the name of the header to searchdefaultValue - the default valuedefaultValue if
there's no such header or its value is not an integer.public Short getShort(CharSequence name)
HttpHeadersgetShort in class HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not a short.public short getShort(CharSequence name, short defaultValue)
HttpHeadersgetShort in class HttpHeadersname - the name of the header to searchdefaultValue - the default valuedefaultValue if
there's no such header or its value is not a short.public Long getTimeMillis(CharSequence name)
HttpHeadersgetTimeMillis in class HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not a date.public long getTimeMillis(CharSequence name, long defaultValue)
HttpHeadersgetTimeMillis in class HttpHeadersname - the name of the header to searchdefaultValue - the default valuedefaultValue if
there's no such header or its value is not a date.@Deprecated public List<String> getAll(String name)
getAll in class HttpHeaders#getAll(CharSequence)}@Deprecated public List<String> getAll(CharSequence name)
getAll in class HttpHeadersname - The name of the headers to searchList of header values which will be empty if no values
are found@Deprecated public List<Map.Entry<String,String>> entries()
entries in class HttpHeaders@Deprecated public Iterator<Map.Entry<String,String>> iterator()
@Deprecated public Iterator<Map.Entry<CharSequence,CharSequence>> iteratorCharSequence()
iteratorCharSequence in class HttpHeaders@Deprecated public boolean contains(String name)
contains in class HttpHeaders#contains(CharSequence)}public boolean contains(CharSequence name)
HttpHeaderscontains in class HttpHeadersname - The name of the header to search forpublic boolean isEmpty()
HttpHeadersisEmpty in class HttpHeaderspublic int size()
HttpHeaderssize in class HttpHeaderspublic boolean contains(String name, String value, boolean ignoreCase)
contains in class HttpHeaders#contains(CharSequence, CharSequence, boolean)}public boolean contains(CharSequence name, CharSequence value, boolean ignoreCase)
HttpHeaderstrue if a header with the name and value exists, false otherwise.
If ignoreCase is true then a case insensitive compare is done on the value.
contains in class HttpHeadersname - the name of the header to findvalue - the value of the header to findignoreCase - true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.@Deprecated public Set<String> names()
names in class HttpHeadersCopyright © 2008–2015 The Netty Project. All rights reserved.