public class EmptyHttpHeaders extends HttpHeaders
HttpHeaders.Names, HttpHeaders.Values| Modifier and Type | Field and Description |
|---|---|
static EmptyHttpHeaders |
INSTANCE |
EMPTY_HEADERS| Modifier | Constructor and Description |
|---|---|
protected |
EmptyHttpHeaders() |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
add(String name,
Iterable<?> values) |
HttpHeaders |
add(String name,
Object value) |
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(String name) |
List<Map.Entry<String,String>> |
entries() |
String |
get(String name) |
List<String> |
getAll(String name) |
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.
|
boolean |
isEmpty()
Checks if no header exists.
|
Iterator<Map.Entry<String,String>> |
iterator() |
Iterator<Map.Entry<CharSequence,CharSequence>> |
iteratorCharSequence() |
Set<String> |
names() |
HttpHeaders |
remove(String name) |
HttpHeaders |
set(String name,
Iterable<?> values) |
HttpHeaders |
set(String name,
Object value) |
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.
|
add, add, add, addDateHeader, addDateHeader, addHeader, addHeader, addIntHeader, addIntHeader, clearHeaders, contains, contains, contains, encodeAscii, equalsIgnoreCase, get, get, getAll, 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, remove, removeHeader, removeHeader, removeTransferEncodingChunked, set, set, set, set100ContinueExpected, set100ContinueExpected, setAll, setContentLength, setDate, setDateHeader, setDateHeader, setDateHeader, setDateHeader, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntHeader, setIntHeader, setIntHeader, setIntHeader, setKeepAlive, setTransferEncodingChunkedpublic static final EmptyHttpHeaders INSTANCE
public String get(String name)
get in class HttpHeaders#get(CharSequence)}public 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.public List<String> getAll(String name)
getAll in class HttpHeaders#getAll(CharSequence)}public boolean contains(String name)
contains in class HttpHeaders#contains(CharSequence)}public boolean isEmpty()
HttpHeadersisEmpty in class HttpHeaderspublic int size()
HttpHeaderssize in class HttpHeaderspublic Set<String> names()
names in class HttpHeaderspublic HttpHeaders add(String name, Object value)
add in class HttpHeaderspublic HttpHeaders add(String name, Iterable<?> values)
add in class HttpHeaderspublic 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 valuethispublic HttpHeaders set(String name, Object value)
set in class HttpHeaderspublic HttpHeaders set(String name, Iterable<?> values)
set in class HttpHeaderspublic 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 remove(String name)
remove in class HttpHeaderspublic HttpHeaders clear()
HttpHeadersHttpMessage.clear in class HttpHeadersthispublic Iterator<Map.Entry<CharSequence,CharSequence>> iteratorCharSequence()
iteratorCharSequence in class HttpHeadersCopyright © 2008–2015 The Netty Project. All rights reserved.