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. |
Optional<Long> |
firstValueAsLong(String name) |
Returns an
Optional containing the first value of the
named header field as an Optional<Long>. |
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 valueOptional<Long> firstValueAsLong(String name)
Optional
containing the first value of the
named header field as an Optional<Long>. 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 nameOptional<Long>
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
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-10-04-161205.jjg.dev.8159855.tools-spi