Package io.netty.handler.codec.spdy
Class DefaultSpdyHeaders
- java.lang.Object
-
- io.netty.handler.codec.DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,SpdyHeaders>
-
- io.netty.handler.codec.spdy.DefaultSpdyHeaders
-
- All Implemented Interfaces:
Headers<java.lang.CharSequence,java.lang.CharSequence,SpdyHeaders>
,SpdyHeaders
,java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>
public class DefaultSpdyHeaders extends DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,SpdyHeaders> implements SpdyHeaders
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.handler.codec.DefaultHeaders
DefaultHeaders.HeaderEntry<K,V>, DefaultHeaders.NameValidator<K>, DefaultHeaders.ValueValidator<V>
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.spdy.SpdyHeaders
SpdyHeaders.HttpNames
-
-
Field Summary
-
Fields inherited from class io.netty.handler.codec.DefaultHeaders
head
-
-
Constructor Summary
Constructors Constructor Description DefaultSpdyHeaders()
DefaultSpdyHeaders(boolean validate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.CharSequence name, java.lang.CharSequence value)
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.boolean
contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean ignoreCase)
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.java.util.List<java.lang.String>
getAllAsString(java.lang.CharSequence name)
java.lang.String
getAsString(java.lang.CharSequence name)
Headers.get(Object)
and convert the result to aString
.java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>>
iteratorAsString()
-
Methods inherited from class io.netty.handler.codec.DefaultHeaders
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addImpl, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, clear, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, copy, 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, nameValidator, newHeaderEntry, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size, toString, validateName, validateValue, valueConverter, valueIterator, valueValidator
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.handler.codec.Headers
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, clear, contains, 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, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size
-
-
-
-
Method Detail
-
getAsString
public java.lang.String getAsString(java.lang.CharSequence name)
Description copied from interface:SpdyHeaders
Headers.get(Object)
and convert the result to aString
.- Specified by:
getAsString
in interfaceSpdyHeaders
- Parameters:
name
- the name of the header to retrieve- Returns:
- the first header value if the header is found.
null
if there's no such header.
-
getAllAsString
public java.util.List<java.lang.String> getAllAsString(java.lang.CharSequence name)
Description copied from interface:SpdyHeaders
- Specified by:
getAllAsString
in interfaceSpdyHeaders
- Parameters:
name
- the name of the header to retrieve- Returns:
- a
List
of header values or an emptyList
if no values are found.
-
iteratorAsString
public java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iteratorAsString()
Description copied from interface:SpdyHeaders
- Specified by:
iteratorAsString
in interfaceSpdyHeaders
-
contains
public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:Headers
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.The
Object.equals(Object)
method is used to test for equality ofvalue
.- Specified by:
contains
in interfaceHeaders<java.lang.CharSequence,java.lang.CharSequence,SpdyHeaders>
- Overrides:
contains
in classDefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,SpdyHeaders>
- Parameters:
name
- the header namevalue
- the header value of the header to find
-
contains
public boolean contains(java.lang.CharSequence name, java.lang.CharSequence value, boolean ignoreCase)
Description copied from interface:SpdyHeaders
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.If
ignoreCase
istrue
then a case insensitive compare is done on the value.- Specified by:
contains
in interfaceSpdyHeaders
- Parameters:
name
- 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.
-
-