public static class FromServer.Header.HttpDate extends FromServer.Header<java.time.ZonedDateTime>
Type representing headers that have values which are zoned date time values. Values representing seconds from now are also converted to zoned date time values with UTC/GMT zone offsets.
Example 1: Retry-After: Fri, 07 Nov 2014 23:59:59 GMT
Example 2: Retry-After: 120
FromServer.Header.CombinedMap, FromServer.Header.CsvList, FromServer.Header.HttpCookies, FromServer.Header.HttpDate, FromServer.Header.MapPairs, FromServer.Header.SingleLong, FromServer.Header.ValueOnly
Constructor and Description |
---|
HttpDate(java.lang.String key,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getParsedType()
Retrieves the type of the parsed representation of the 'value`.
|
java.time.ZonedDateTime |
parse()
Always returns
ZonedDateTime |
java.time.ZonedDateTime |
parse(java.time.format.DateTimeFormatter formatter)
Retrieves the
ZonedDateTime value of the header using the provided DateTimeFormatter . |
cleanQuotes, equals, find, full, getKey, getParsed, getValue, hashCode, key, keyValue, setValue, toString, value
public java.time.ZonedDateTime parse()
Always returns ZonedDateTime
parse
in class FromServer.Header<java.time.ZonedDateTime>
public java.time.ZonedDateTime parse(java.time.format.DateTimeFormatter formatter)
Retrieves the ZonedDateTime
value of the header using the provided DateTimeFormatter
.
formatter
- the formatter to be usedpublic java.lang.Class<?> getParsedType()
FromServer.Header
Retrieves the type of the parsed representation of the 'value`.
getParsedType
in class FromServer.Header<java.time.ZonedDateTime>