public final class HeadersUtils
extends java.lang.Object
Headers
.Modifier and Type | Class and Description |
---|---|
private static class |
HeadersUtils.CharSequenceDelegatingStringSet |
private static class |
HeadersUtils.DelegatingStringSet<T> |
private static class |
HeadersUtils.StringEntry |
private static class |
HeadersUtils.StringEntryIterator |
private static class |
HeadersUtils.StringIterator<T> |
Modifier | Constructor and Description |
---|---|
private |
HeadersUtils() |
Modifier and Type | Method and Description |
---|---|
static <K,V> java.util.List<java.lang.String> |
getAllAsString(Headers<K,V,?> headers,
K name)
|
static <K,V> java.lang.String |
getAsString(Headers<K,V,?> headers,
K name)
Headers.get(Object) and convert the result to a String . |
static java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
iteratorAsString(java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> headers)
|
static java.util.Set<java.lang.String> |
namesAsString(Headers<java.lang.CharSequence,java.lang.CharSequence,?> headers)
|
public static <K,V> java.util.List<java.lang.String> getAllAsString(Headers<K,V,?> headers, K name)
name
- the name of the header to retrieveList
of header values or an empty List
if no values are found.public static <K,V> java.lang.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 java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iteratorAsString(java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> headers)
public static java.util.Set<java.lang.String> namesAsString(Headers<java.lang.CharSequence,java.lang.CharSequence,?> headers)
headers
- the headers to get the names fromSet
of header values or an empty Set
if no values are found.