public class EmptyHttpHeaders extends HttpHeaders
HttpHeaders.Names, HttpHeaders.Values| 限定符和类型 | 字段和说明 |
|---|---|
static EmptyHttpHeaders |
INSTANCE |
EMPTY_HEADERS| 限定符 | 构造器和说明 |
|---|---|
protected |
EmptyHttpHeaders() |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpHeaders |
add(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
add(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
addInt(java.lang.CharSequence name,
int value)
Add the
name to value. |
HttpHeaders |
addShort(java.lang.CharSequence name,
short value)
Add the
name to value. |
HttpHeaders |
clear()
Removes all headers from this
HttpMessage. |
boolean |
contains(java.lang.String name) |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> |
entries()
Returns a new
List that contains all headers in this object. |
java.lang.String |
get(java.lang.String name) |
java.util.List<java.lang.String> |
getAll(java.lang.String name) |
java.lang.Integer |
getInt(java.lang.CharSequence name)
Returns the integer value of a header with the specified name.
|
int |
getInt(java.lang.CharSequence name,
int defaultValue)
Returns the integer value of a header with the specified name.
|
java.lang.Short |
getShort(java.lang.CharSequence name)
Returns the short value of a header with the specified name.
|
short |
getShort(java.lang.CharSequence name,
short defaultValue)
Returns the short value of a header with the specified name.
|
java.lang.Long |
getTimeMillis(java.lang.CharSequence name)
Returns the date value of a header with the specified name.
|
long |
getTimeMillis(java.lang.CharSequence name,
long defaultValue)
Returns the date value of a header with the specified name.
|
boolean |
isEmpty()
Checks if no header exists.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
iterator() |
java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> |
iteratorCharSequence() |
java.util.Set<java.lang.String> |
names()
Returns a new
Set that contains the names of all headers in this object. |
HttpHeaders |
remove(java.lang.String name) |
HttpHeaders |
set(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
set(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
setInt(java.lang.CharSequence name,
int value)
Set the
name to value. |
HttpHeaders |
setShort(java.lang.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, containsValue, copy, 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, setTransferEncodingChunked, toString, valueCharSequenceIterator, valueStringIteratorpublic static final EmptyHttpHeaders INSTANCE
public java.lang.String get(java.lang.String name)
get 在类中 HttpHeadersHttpHeaders.get(CharSequence)public java.lang.Integer getInt(java.lang.CharSequence name)
HttpHeadersgetInt 在类中 HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not an integer.public int getInt(java.lang.CharSequence name,
int defaultValue)
HttpHeadersgetInt 在类中 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 java.lang.Short getShort(java.lang.CharSequence name)
HttpHeadersgetShort 在类中 HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not a short.public short getShort(java.lang.CharSequence name,
short defaultValue)
HttpHeadersgetShort 在类中 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 java.lang.Long getTimeMillis(java.lang.CharSequence name)
HttpHeadersgetTimeMillis 在类中 HttpHeadersname - the name of the header to searchnull if there's no
such header or its value is not a date.public long getTimeMillis(java.lang.CharSequence name,
long defaultValue)
HttpHeadersgetTimeMillis 在类中 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 java.util.List<java.lang.String> getAll(java.lang.String name)
getAll 在类中 HttpHeadersHttpHeaders.getAll(CharSequence)public java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> entries()
HttpHeadersList that contains all headers in this object. Note that modifying the
returned List will not affect the state of this object. If you intend to enumerate over the header
entries only, use HttpHeaders.iterator() instead, which has much less overhead.entries 在类中 HttpHeadersHttpHeaders.iteratorCharSequence()public boolean contains(java.lang.String name)
contains 在类中 HttpHeadersHttpHeaders.contains(CharSequence)public boolean isEmpty()
HttpHeadersisEmpty 在类中 HttpHeaderspublic int size()
HttpHeaderssize 在类中 HttpHeaderspublic java.util.Set<java.lang.String> names()
HttpHeadersSet that contains the names of all headers in this object. Note that modifying the
returned Set will not affect the state of this object. If you intend to enumerate over the header
entries only, use HttpHeaders.iterator() instead, which has much less overhead.names 在类中 HttpHeaderspublic HttpHeaders add(java.lang.String name, java.lang.Object value)
add 在类中 HttpHeadersHttpHeaders.add(CharSequence, Object)public HttpHeaders add(java.lang.String name, java.lang.Iterable<?> values)
add 在类中 HttpHeadersHttpHeaders.add(CharSequence, Iterable)public HttpHeaders addInt(java.lang.CharSequence name, int value)
HttpHeadersname to value.addInt 在类中 HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders addShort(java.lang.CharSequence name, short value)
HttpHeadersname to value.addShort 在类中 HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders set(java.lang.String name, java.lang.Object value)
set 在类中 HttpHeadersHttpHeaders.set(CharSequence, Object)public HttpHeaders set(java.lang.String name, java.lang.Iterable<?> values)
set 在类中 HttpHeadersHttpHeaders.set(CharSequence, Iterable)public HttpHeaders setInt(java.lang.CharSequence name, int value)
HttpHeadersname to value. This will remove all previous values associated with name.setInt 在类中 HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders setShort(java.lang.CharSequence name, short value)
HttpHeadersname to value. This will remove all previous values associated with name.setShort 在类中 HttpHeadersname - The name to modifyvalue - The valuethispublic HttpHeaders remove(java.lang.String name)
remove 在类中 HttpHeadersHttpHeaders.remove(CharSequence)public HttpHeaders clear()
HttpHeadersHttpMessage.clear 在类中 HttpHeadersthispublic java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iterator()
iterator 在接口中 java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>iterator 在类中 HttpHeaderspublic java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> iteratorCharSequence()
iteratorCharSequence 在类中 HttpHeaders