public interface Headers
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String name)
Checks whether a header has been specified for the given value.
|
String |
get(String name)
Returns the header value with the specified header name.
|
List<String> |
getAll(String name)
Returns all of the header values with the specified header name.
|
Date |
getDate(String name)
Returns the header value as a date with the specified header name.
|
Set<String> |
getNames()
All header names.
|
@Nullable String get(String name)
If there is more than one header value for the specified header name, the first value is returned.
name
- The case insensitive name of the header to get retrieve the first value ofnull
if there is no such header@Nullable Date getDate(String name)
If there is more than one header value for the specified header name, the first value is returned.
name
- The case insensitive name of the header to get retrieve the first value ofnull
if there is no such header or the header value is not a valid date formatList<String> getAll(String name)
name
- The case insensitive name of the header to retrieve all of the values ofList
of header values, or an empty list if there is no such headerboolean contains(String name)
name
- The name of the header to check the existence of