UrlResponseInfo.HeaderBlock

public abstract class UrlResponseInfo.HeaderBlock


Unmodifiable container of response headers or trailers.

Summary

Public constructors

Public methods

abstract List<Map.Entry<StringString>>

Returns an unmodifiable list of the response header field and value pairs.

abstract Map<StringList<String>>

Returns an unmodifiable map from response-header field names to lists of values.

Public constructors

HeaderBlock

public HeaderBlock()

Public methods

getAsList

public abstract List<Map.Entry<StringString>> getAsList()

Returns an unmodifiable list of the response header field and value pairs. The headers are in the same order they are received over the wire.

Returns
List<Map.Entry<StringString>>

an unmodifiable list of response header field and value pairs

getAsMap

public abstract Map<StringList<String>> getAsMap()

Returns an unmodifiable map from response-header field names to lists of values. Each list of values for a single header field is in the same order they were received over the wire.

Returns
Map<StringList<String>>

an unmodifiable map from response-header field names to lists of values