public interface HttpHeaders
Modifier and Type | Method | Description |
---|---|---|
List<String> |
allValues(String name) |
Returns an unmodifiable List of all of the values of the given named
header.
|
Optional<String> |
firstValue(String name) |
Returns an
Optional containing the first value of the
given named (and possibly multi-valued) header. |
OptionalLong |
firstValueAsLong(String name) |
Returns an
OptionalLong containing the first value of the
named header field. |
Map<String,List<String>> |
map() |
Returns an unmodifiable multi Map view of this HttpHeaders.
|
Optional<String> firstValue(String name)
Optional
containing the first value of the
given named (and possibly multi-valued) header. If the header is not
present, then the returned Optional
is empty.name
- the header nameOptional<String>
for the first named valueOptionalLong firstValueAsLong(String name)
OptionalLong
containing the first value of the
named header field. If the header is not
present, then the Optional is empty. If the header is present but
contains a value that does not parse as a Long
value, then an
exception is thrown.name
- the header nameOptionalLong
NumberFormatException
- if a value is found, but does not parse as
a LongList<String> allValues(String name)
name
- the header name Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b161-1