Class HeadersUtils
java.lang.Object
io.netty.handler.codec.HeadersUtils
-
Method Summary
Modifier and TypeMethodDescriptiongetAllAsString(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 aString.iteratorAsString(Iterable<Map.Entry<CharSequence, CharSequence>> headers) namesAsString(Headers<CharSequence, CharSequence, ?> headers) static <K,V> String Helper for implementing toString forDefaultHeadersand wrappers such as DefaultHttpHeaders.
-
Method Details
-
getAllAsString
-
getAsString
Headers.get(Object)and convert the result to aString.- Parameters:
headers- the headers to get thenamefromname- the name of the header to retrieve- Returns:
- the first header value if the header is found.
nullif there's no such entry.
-
iteratorAsString
public static Iterator<Map.Entry<String,String>> iteratorAsString(Iterable<Map.Entry<CharSequence, CharSequence>> headers) -
toString
public static <K,V> String toString(Class<?> headersClass, Iterator<Map.Entry<K, V>> headersIt, int size) Helper for implementing toString forDefaultHeadersand wrappers such as DefaultHttpHeaders.- Parameters:
headersClass- the class of headersheadersIt- the iterator on the actual headerssize- the size of the iterator- Returns:
- a String representation of the headers
-
namesAsString
-