Modifier and Type | Method and Description |
---|---|
static <K,V> List<String> |
getAllAsString(Headers<K,V,?> headers,
K name)
|
static <K,V> String |
getAsString(Headers<K,V,?> headers,
K name)
Headers.get(Object) and convert the result to a String . |
static Iterator<Map.Entry<String,String>> |
iteratorAsString(Iterable<Map.Entry<CharSequence,CharSequence>> headers)
|
static Set<String> |
namesAsString(Headers<CharSequence,CharSequence,?> headers)
|
static <K,V> String |
toString(Class<?> headersClass,
Iterator<Map.Entry<K,V>> headersIt,
int size)
Helper for implementing toString for
DefaultHeaders and wrappers such as DefaultHttpHeaders. |
public static <K,V> String getAsString(Headers<K,V,?> headers, K name)
Headers.get(Object)
and convert the result to a String
.headers
- the headers to get the name
fromname
- the name of the header to retrievenull
if there's no such entry.public static Iterator<Map.Entry<String,String>> iteratorAsString(Iterable<Map.Entry<CharSequence,CharSequence>> headers)
public static <K,V> String toString(Class<?> headersClass, Iterator<Map.Entry<K,V>> headersIt, int size)
DefaultHeaders
and wrappers such as DefaultHttpHeaders.headersClass
- the class of headersheadersIt
- the iterator on the actual headerssize
- the size of the iteratorpublic static Set<String> namesAsString(Headers<CharSequence,CharSequence,?> headers)
Copyright © 2008–2019 The Netty Project. All rights reserved.