public class DefaultTextHeaders extends DefaultConvertibleHeaders<CharSequence,String> implements TextHeaders
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultTextHeaders.DefaultTextValueTypeConverter |
DefaultHeaders.HashCodeGenerator<T>, DefaultHeaders.IdentityNameConverter<T>, DefaultHeaders.KeyValueHeaderIterator, DefaultHeaders.NameConverter<T>TextHeaders.EntryVisitor, TextHeaders.NameVisitorConvertibleHeaders.TypeConverter<UnconvertedType,ConvertedType>Headers.ValueConverter<T>| Modifier | Constructor and Description |
|---|---|
|
DefaultTextHeaders() |
|
DefaultTextHeaders(boolean ignoreCase) |
|
DefaultTextHeaders(boolean ignoreCase,
boolean singleHeaderFields) |
protected |
DefaultTextHeaders(boolean ignoreCase,
Headers.ValueConverter<CharSequence> valueConverter,
DefaultHeaders.NameConverter<CharSequence> nameConverter) |
|
DefaultTextHeaders(boolean ignoreCase,
Headers.ValueConverter<CharSequence> valueConverter,
DefaultHeaders.NameConverter<CharSequence> nameConverter,
boolean singleHeaderFields) |
| Modifier and Type | Method and Description |
|---|---|
TextHeaders |
add(CharSequence name,
CharSequence... values)
Adds a new header with the specified name and values.
|
TextHeaders |
add(CharSequence name,
CharSequence value)
Adds a new header with the specified name and value.
|
TextHeaders |
add(CharSequence name,
Iterable<? extends CharSequence> values)
Adds a new header with the specified name and values.
|
TextHeaders |
add(TextHeaders headers)
|
TextHeaders |
addBoolean(CharSequence name,
boolean value)
Add the
name to value. |
TextHeaders |
addByte(CharSequence name,
byte value)
Add the
name to value. |
TextHeaders |
addChar(CharSequence name,
char value)
Add the
name to value. |
TextHeaders |
addDouble(CharSequence name,
double value)
Add the
name to value. |
TextHeaders |
addFloat(CharSequence name,
float value)
Add the
name to value. |
TextHeaders |
addInt(CharSequence name,
int value)
Add the
name to value. |
TextHeaders |
addLong(CharSequence name,
long value)
Add the
name to value. |
TextHeaders |
addObject(CharSequence name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
TextHeaders |
addObject(CharSequence name,
Object... values)
Adds a new header with the specified name and values.
|
TextHeaders |
addObject(CharSequence name,
Object value)
Adds a new header with the specified name and value.
|
TextHeaders |
addShort(CharSequence name,
short value)
Add the
name to value. |
TextHeaders |
addTimeMillis(CharSequence name,
long value)
Add the
name to value. |
TextHeaders |
clear()
Removes all headers.
|
boolean |
contains(CharSequence name,
CharSequence value,
boolean ignoreCase)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(CharSequence name,
Object value,
boolean ignoreCase)
Returns
true if a header with the name and value exists. |
TextHeaders |
set(CharSequence name,
CharSequence... values)
Sets a header with the specified name and values.
|
TextHeaders |
set(CharSequence name,
CharSequence value)
Sets a header with the specified name and value.
|
TextHeaders |
set(CharSequence name,
Iterable<? extends CharSequence> values)
Sets a header with the specified name and values.
|
TextHeaders |
set(TextHeaders headers)
|
TextHeaders |
setAll(TextHeaders headers)
|
TextHeaders |
setBoolean(CharSequence name,
boolean value)
Set the
name to value. |
TextHeaders |
setByte(CharSequence name,
byte value)
Set the
name to value. |
TextHeaders |
setChar(CharSequence name,
char value)
Set the
name to value. |
TextHeaders |
setDouble(CharSequence name,
double value)
Set the
name to value. |
TextHeaders |
setFloat(CharSequence name,
float value)
Set the
name to value. |
TextHeaders |
setInt(CharSequence name,
int value)
Set the
name to value. |
TextHeaders |
setLong(CharSequence name,
long value)
Set the
name to value. |
TextHeaders |
setObject(CharSequence name,
Iterable<?> values)
Sets a header with the specified name and values.
|
TextHeaders |
setObject(CharSequence name,
Object... values)
Sets a header with the specified name and values.
|
TextHeaders |
setObject(CharSequence name,
Object value)
Sets a header with the specified name and value.
|
TextHeaders |
setShort(CharSequence name,
short value)
Set the
name to value. |
TextHeaders |
setTimeMillis(CharSequence name,
long value)
Set the
name to value. |
entriesConverted, getAllAndConvert, getAllAndRemoveAndConvert, getAndConvert, getAndConvert, getAndRemoveAndConvert, getAndRemoveAndConvert, iteratorConverted, namesAndConvertadd, contains, contains, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsObject, containsObject, containsShort, containsTimeMillis, entries, equals, forEachEntry, forEachName, 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, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, hashCode, isEmpty, iterator, names, namesList, remove, set, setAll, size, toString, valueConverterclone, finalize, getClass, notify, notifyAll, wait, wait, waitentriesConverted, getAllAndConvert, getAllAndRemoveAndConvert, getAndConvert, getAndConvert, getAndRemoveAndConvert, getAndRemoveAndConvert, iteratorConverted, namesAndConvertadd, contains, contains, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsObject, containsObject, containsShort, containsTimeMillis, entries, forEachEntry, forEachName, 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, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, isEmpty, iterator, names, namesList, remove, set, setAll, sizepublic DefaultTextHeaders()
public DefaultTextHeaders(boolean ignoreCase)
public DefaultTextHeaders(boolean ignoreCase,
boolean singleHeaderFields)
protected DefaultTextHeaders(boolean ignoreCase,
Headers.ValueConverter<CharSequence> valueConverter,
DefaultHeaders.NameConverter<CharSequence> nameConverter)
public DefaultTextHeaders(boolean ignoreCase,
Headers.ValueConverter<CharSequence> valueConverter,
DefaultHeaders.NameConverter<CharSequence> nameConverter,
boolean singleHeaderFields)
public boolean contains(CharSequence name, CharSequence value, boolean ignoreCase)
TextHeaderstrue if a header with the name and value exists.contains in interface TextHeadersname - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsObject(CharSequence name, Object value, boolean ignoreCase)
TextHeaderstrue if a header with the name and value exists.containsObject in interface TextHeadersname - the header namevalue - the header valuetrue if it contains it false otherwisepublic TextHeaders add(CharSequence name, CharSequence value)
HeadersString, it is
converted into a String by Object.toString(), except in the cases of Date and
Calendar, which are formatted to the date format defined in RFC2616.add in interface Headers<CharSequence>add in interface TextHeadersadd in class DefaultHeaders<CharSequence>name - the name of the header being addedvalue - the value of the header being addedthispublic TextHeaders add(CharSequence name, Iterable<? extends CharSequence> values)
Headers
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
add in interface Headers<CharSequence>add in interface TextHeadersadd in class DefaultHeaders<CharSequence>name - the name of the headepublic abstract rs being setvalues - the values of the headers being setthispublic TextHeaders add(CharSequence name, CharSequence... values)
Headers
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
add in interface Headers<CharSequence>add in interface TextHeadersadd in class DefaultHeaders<CharSequence>name - the name of the headepublic abstract rs being setvalues - the values of the headers being setthispublic TextHeaders addObject(CharSequence name, Object value)
HeadersString, it is
converted into a String by Object.toString(), except in the cases of Date and
Calendar, which are formatted to the date format defined in RFC2616.addObject in interface Headers<CharSequence>addObject in interface TextHeadersaddObject in class DefaultHeaders<CharSequence>name - the name of the header being addedvalue - the value of the header being addedthispublic TextHeaders addObject(CharSequence name, Iterable<?> values)
Headers
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface TextHeadersaddObject in class DefaultHeaders<CharSequence>name - the name of the headepublic abstract rs being setvalues - the values of the headers being setthispublic TextHeaders addObject(CharSequence name, Object... values)
Headers
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
addObject in interface Headers<CharSequence>addObject in interface TextHeadersaddObject in class DefaultHeaders<CharSequence>name - the name of the headepublic abstract rs being setvalues - the values of the headers being setthispublic TextHeaders addBoolean(CharSequence name, boolean value)
Headersname to value.addBoolean in interface Headers<CharSequence>addBoolean in interface TextHeadersaddBoolean in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addChar(CharSequence name, char value)
Headersname to value.addChar in interface Headers<CharSequence>addChar in interface TextHeadersaddChar in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addByte(CharSequence name, byte value)
Headersname to value.addByte in interface Headers<CharSequence>addByte in interface TextHeadersaddByte in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addShort(CharSequence name, short value)
Headersname to value.addShort in interface Headers<CharSequence>addShort in interface TextHeadersaddShort in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addInt(CharSequence name, int value)
Headersname to value.addInt in interface Headers<CharSequence>addInt in interface TextHeadersaddInt in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addLong(CharSequence name, long value)
Headersname to value.addLong in interface Headers<CharSequence>addLong in interface TextHeadersaddLong in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addFloat(CharSequence name, float value)
Headersname to value.addFloat in interface Headers<CharSequence>addFloat in interface TextHeadersaddFloat in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addDouble(CharSequence name, double value)
Headersname to value.addDouble in interface Headers<CharSequence>addDouble in interface TextHeadersaddDouble in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders addTimeMillis(CharSequence name, long value)
Headersname to value.addTimeMillis in interface Headers<CharSequence>addTimeMillis in interface TextHeadersaddTimeMillis in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders add(TextHeaders headers)
TextHeadersadd in interface TextHeaderspublic TextHeaders set(CharSequence name, CharSequence value)
HeadersString, it is converted into a String by
Object.toString(), except for Date and Calendar, which are formatted
to the date format defined in RFC2616.set in interface Headers<CharSequence>set in interface TextHeadersset in class DefaultHeaders<CharSequence>name - The name of the header being setvalue - The value of the header being setthispublic TextHeaders set(CharSequence name, Iterable<? extends CharSequence> values)
Headers
headers.remove(name);
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
set in interface Headers<CharSequence>set in interface TextHeadersset in class DefaultHeaders<CharSequence>name - the name of the headers being setvalues - the values of the headers being setthispublic TextHeaders set(CharSequence name, CharSequence... values)
Headers
headers.remove(name);
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
set in interface Headers<CharSequence>set in interface TextHeadersset in class DefaultHeaders<CharSequence>name - the name of the headers being setvalues - the values of the headers being setthispublic TextHeaders setObject(CharSequence name, Object value)
HeadersString, it is converted into a String by
Object.toString(), except for Date and Calendar, which are formatted
to the date format defined in RFC2616.setObject in interface Headers<CharSequence>setObject in interface TextHeaderssetObject in class DefaultHeaders<CharSequence>name - The name of the header being setvalue - The value of the header being setthispublic TextHeaders setObject(CharSequence name, Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface TextHeaderssetObject in class DefaultHeaders<CharSequence>name - the name of the headers being setvalues - the values of the headers being setthispublic TextHeaders setObject(CharSequence name, Object... values)
Headers
headers.remove(name);
for (Object v : values) {
if (v == null) {
break;
}
headers.add(name, v);
}
setObject in interface Headers<CharSequence>setObject in interface TextHeaderssetObject in class DefaultHeaders<CharSequence>name - the name of the headers being setvalues - the values of the headers being setthispublic TextHeaders 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 TextHeaderssetBoolean in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetChar in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetByte in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetShort in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetInt in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetLong in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetFloat in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetDouble in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders 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 TextHeaderssetTimeMillis in class DefaultHeaders<CharSequence>name - The name to modifyvalue - The valuethispublic TextHeaders set(TextHeaders headers)
TextHeadersset in interface TextHeaderspublic TextHeaders setAll(TextHeaders headers)
TextHeaderssetAll in interface TextHeaderspublic TextHeaders clear()
Headersclear in interface Headers<CharSequence>clear in interface TextHeadersclear in class DefaultHeaders<CharSequence>thisCopyright © 2008–2015 The Netty Project. All rights reserved.