public class DefaultSpdyHeaders extends DefaultHeaders<CharSequence> implements SpdyHeaders
DefaultHeaders.HeaderDateFormat, DefaultHeaders.HeaderEntry<T>, DefaultHeaders.NameValidator<T>SpdyHeaders.HttpNameshead| Constructor and Description |
|---|
DefaultSpdyHeaders() |
| Modifier and Type | Method and Description |
|---|---|
SpdyHeaders |
add(CharSequence name,
CharSequence... values)
Adds new headers with the specified
name and values. |
SpdyHeaders |
add(CharSequence name,
CharSequence value)
Adds a new header with the specified
name and value. |
SpdyHeaders |
add(CharSequence name,
Iterable<? extends CharSequence> values)
Adds new headers with the specified
name and values. |
SpdyHeaders |
add(Headers<? extends CharSequence> headers)
Adds all header names and values of
headers to this object. |
SpdyHeaders |
addBoolean(CharSequence name,
boolean value)
Adds a new header.
|
SpdyHeaders |
addByte(CharSequence name,
byte value)
Adds a new header.
|
SpdyHeaders |
addChar(CharSequence name,
char value)
Adds a new header.
|
SpdyHeaders |
addDouble(CharSequence name,
double value)
Adds a new header.
|
SpdyHeaders |
addFloat(CharSequence name,
float value)
Adds a new header.
|
SpdyHeaders |
addInt(CharSequence name,
int value)
Adds a new header.
|
SpdyHeaders |
addLong(CharSequence name,
long value)
Adds a new header.
|
SpdyHeaders |
addObject(CharSequence name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
SpdyHeaders |
addObject(CharSequence name,
Object... values)
Adds a new header with the specified name and values.
|
SpdyHeaders |
addObject(CharSequence name,
Object value)
Adds a new header.
|
SpdyHeaders |
addShort(CharSequence name,
short value)
Adds a new header.
|
SpdyHeaders |
addTimeMillis(CharSequence name,
long value)
Adds a new header.
|
SpdyHeaders |
clear()
Removes all headers.
|
boolean |
contains(CharSequence name,
CharSequence value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(CharSequence name,
CharSequence value,
boolean ignoreCase)
Returns
true if a header with the name and value exists, false otherwise. |
List<String> |
getAllAsString(CharSequence name)
|
String |
getAsString(CharSequence name)
Headers.get(Object) and convert the result to a String. |
Iterator<Map.Entry<String,String>> |
iteratorAsString()
|
SpdyHeaders |
set(CharSequence name,
CharSequence... values)
Sets a header with the specified name and values.
|
SpdyHeaders |
set(CharSequence name,
CharSequence value)
Sets a header with the specified name and value.
|
SpdyHeaders |
set(CharSequence name,
Iterable<? extends CharSequence> values)
Sets a new header with the specified name and values.
|
SpdyHeaders |
set(Headers<? extends CharSequence> headers)
Clears the current header entries and copies all header entries of the specified
headers. |
SpdyHeaders |
setAll(Headers<? extends CharSequence> headers)
Retains all current headers but calls
#set(T, T) for each entry in headers. |
SpdyHeaders |
setBoolean(CharSequence name,
boolean value)
Set the
name to value. |
SpdyHeaders |
setByte(CharSequence name,
byte value)
Set the
name to value. |
SpdyHeaders |
setChar(CharSequence name,
char value)
Set the
name to value. |
SpdyHeaders |
setDouble(CharSequence name,
double value)
Set the
name to value. |
SpdyHeaders |
setFloat(CharSequence name,
float value)
Set the
name to value. |
SpdyHeaders |
setInt(CharSequence name,
int value)
Set the
name to value. |
SpdyHeaders |
setLong(CharSequence name,
long value)
Set the
name to value. |
SpdyHeaders |
setObject(CharSequence name,
Iterable<?> values)
Sets a header with the specified name and values.
|
SpdyHeaders |
setObject(CharSequence name,
Object... values)
Sets a header with the specified name and values.
|
SpdyHeaders |
setObject(CharSequence name,
Object value)
Sets a new header.
|
SpdyHeaders |
setShort(CharSequence name,
short value)
Set the
name to value. |
SpdyHeaders |
setTimeMillis(CharSequence name,
long value)
Set the
name to value. |
contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, equals, equals, get, get, getAll, getAllAndRemove, getAndRemove, getAndRemove, getBoolean, getBoolean, getBooleanAndRemove, getBooleanAndRemove, getByte, getByte, getByteAndRemove, getByteAndRemove, getChar, getChar, getCharAndRemove, getCharAndRemove, getDouble, getDouble, getDoubleAndRemove, getDoubleAndRemove, getFloat, getFloat, getFloatAndRemove, getFloatAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, hashCode, hashCode, isEmpty, iterator, names, newHeaderEntry, remove, size, toString, valueConverterclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, get, get, getAll, getAllAndRemove, getAndRemove, getAndRemove, getBoolean, getBoolean, getBooleanAndRemove, getBooleanAndRemove, getByte, getByte, getByteAndRemove, getByteAndRemove, getChar, getChar, getCharAndRemove, getCharAndRemove, getDouble, getDouble, getDoubleAndRemove, getDoubleAndRemove, getFloat, getFloat, getFloatAndRemove, getFloatAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, isEmpty, iterator, names, remove, sizepublic SpdyHeaders add(CharSequence name, CharSequence value)
Headersname and value.add in interface Headers<CharSequence>add in interface SpdyHeadersadd in class DefaultHeaders<CharSequence>name - the name of the headervalue - the value of the headerthispublic SpdyHeaders add(CharSequence name, Iterable<? extends CharSequence> values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add in interface Headers<CharSequence>add in interface SpdyHeadersadd in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic SpdyHeaders add(CharSequence name, CharSequence... values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add in interface Headers<CharSequence>add in interface SpdyHeadersadd in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic SpdyHeaders addObject(CharSequence name, Object value)
Headersvalue is added, it's converted to type T.addObject in interface Headers<CharSequence>addObject in interface SpdyHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addObject(CharSequence name, Iterable<?> values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface SpdyHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic SpdyHeaders addObject(CharSequence name, Object... values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface SpdyHeadersaddObject in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic SpdyHeaders addBoolean(CharSequence name, boolean value)
HeadersaddBoolean in interface Headers<CharSequence>addBoolean in interface SpdyHeadersaddBoolean in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addChar(CharSequence name, char value)
HeadersaddChar in interface Headers<CharSequence>addChar in interface SpdyHeadersaddChar in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addByte(CharSequence name, byte value)
HeadersaddByte in interface Headers<CharSequence>addByte in interface SpdyHeadersaddByte in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addShort(CharSequence name, short value)
HeadersaddShort in interface Headers<CharSequence>addShort in interface SpdyHeadersaddShort in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addInt(CharSequence name, int value)
HeadersaddInt in interface Headers<CharSequence>addInt in interface SpdyHeadersaddInt in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addLong(CharSequence name, long value)
HeadersaddLong in interface Headers<CharSequence>addLong in interface SpdyHeadersaddLong in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addFloat(CharSequence name, float value)
HeadersaddFloat in interface Headers<CharSequence>addFloat in interface SpdyHeadersaddFloat in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addDouble(CharSequence name, double value)
HeadersaddDouble in interface Headers<CharSequence>addDouble in interface SpdyHeadersaddDouble in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders addTimeMillis(CharSequence name, long value)
HeadersaddTimeMillis in interface Headers<CharSequence>addTimeMillis in interface SpdyHeadersaddTimeMillis in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders add(Headers<? extends CharSequence> headers)
Headersheaders to this object.add in interface Headers<CharSequence>add in interface SpdyHeadersadd in class DefaultHeaders<CharSequence>thispublic SpdyHeaders set(CharSequence name, CharSequence value)
Headersset in interface Headers<CharSequence>set in interface SpdyHeadersset in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders set(CharSequence name, Iterable<? extends CharSequence> values)
Headers
for (T v : values) {
headers.addObject(name, v);
}
set in interface Headers<CharSequence>set in interface SpdyHeadersset in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic SpdyHeaders set(CharSequence name, CharSequence... values)
Headers
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
set in interface Headers<CharSequence>set in interface SpdyHeadersset in class DefaultHeaders<CharSequence>name - the header namevalues - the value of the headerthispublic SpdyHeaders setObject(CharSequence name, Object value)
Headersvalue is add, it's
converted to type T.setObject in interface Headers<CharSequence>setObject in interface SpdyHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalue - the value of the headerthispublic SpdyHeaders setObject(CharSequence name, Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface SpdyHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic SpdyHeaders setObject(CharSequence name, Object... values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface SpdyHeaderssetObject in class DefaultHeaders<CharSequence>name - the header namevalues - the values of the headerthispublic SpdyHeaders setBoolean(CharSequence name, boolean value)
Headersname to value. This will remove all previous values associated with name.setBoolean in interface Headers<CharSequence>setBoolean in interface SpdyHeaderssetBoolean in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setChar(CharSequence name, char value)
Headersname to value. This will remove all previous values associated with name.setChar in interface Headers<CharSequence>setChar in interface SpdyHeaderssetChar in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setByte(CharSequence name, byte value)
Headersname to value. This will remove all previous values associated with name.setByte in interface Headers<CharSequence>setByte in interface SpdyHeaderssetByte in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setShort(CharSequence name, short value)
Headersname to value. This will remove all previous values associated with name.setShort in interface Headers<CharSequence>setShort in interface SpdyHeaderssetShort in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setInt(CharSequence name, int value)
Headersname to value. This will remove all previous values associated with name.setInt in interface Headers<CharSequence>setInt in interface SpdyHeaderssetInt in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setLong(CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setLong in interface Headers<CharSequence>setLong in interface SpdyHeaderssetLong in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setFloat(CharSequence name, float value)
Headersname to value. This will remove all previous values associated with name.setFloat in interface Headers<CharSequence>setFloat in interface SpdyHeaderssetFloat in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setDouble(CharSequence name, double value)
Headersname to value. This will remove all previous values associated with name.setDouble in interface Headers<CharSequence>setDouble in interface SpdyHeaderssetDouble in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders setTimeMillis(CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setTimeMillis in interface Headers<CharSequence>setTimeMillis in interface SpdyHeaderssetTimeMillis in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic SpdyHeaders set(Headers<? extends CharSequence> headers)
Headersheaders.set in interface Headers<CharSequence>set in interface SpdyHeadersset in class DefaultHeaders<CharSequence>thispublic SpdyHeaders setAll(Headers<? extends CharSequence> headers)
Headers#set(T, T) for each entry in headers.setAll in interface Headers<CharSequence>setAll in interface SpdyHeaderssetAll in class DefaultHeaders<CharSequence>headers - The headers used to #set(T, T) values in this instancethispublic SpdyHeaders clear()
HeadersHeaders.size() equals 0.clear in interface Headers<CharSequence>clear in interface SpdyHeadersclear in class DefaultHeaders<CharSequence>thispublic String getAsString(CharSequence name)
SpdyHeadersHeaders.get(Object) and convert the result to a String.getAsString in interface SpdyHeadersname - the name of the header to retrievenull if there's no such header.public List<String> getAllAsString(CharSequence name)
SpdyHeadersgetAllAsString in interface SpdyHeadersname - the name of the header to retrieveList of header values or an empty List if no values are found.public Iterator<Map.Entry<String,String>> iteratorAsString()
SpdyHeadersiteratorAsString in interface SpdyHeaderspublic boolean contains(CharSequence name, CharSequence value)
Headerstrue if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
contains in interface Headers<CharSequence>contains in class DefaultHeaders<CharSequence>name - the header namevalue - the header value of the header to findpublic boolean contains(CharSequence name, CharSequence value, boolean ignoreCase)
SpdyHeaderstrue 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 interface SpdyHeadersname - 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.Copyright © 2008–2015 The Netty Project. All rights reserved.