public final class HeaderUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PATTERN_RFC1123 |
| Modifier and Type | Method and Description |
|---|---|
static Optional<LocalDateTime> |
fromHttpDate(Header header) |
static long |
getHeaderAsDate(Header header) |
static boolean |
hasCacheableHeaders(Headers headers)
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4.
|
static Optional<LocalDateTime> |
parseGMTString(String value) |
static String |
toGMTString(LocalDateTime time) |
static Header |
toHttpDate(String headerName,
LocalDateTime time) |
static List<LinkDirective> |
toLinkDirectives(Header header) |
static Header |
toLinkHeader(List<LinkDirective> linkDirectives) |
public static final String PATTERN_RFC1123
public static Optional<LocalDateTime> fromHttpDate(Header header)
public static Optional<LocalDateTime> parseGMTString(String value)
public static Header toHttpDate(String headerName, LocalDateTime time)
public static String toGMTString(LocalDateTime time)
public static long getHeaderAsDate(Header header)
public static boolean hasCacheableHeaders(Headers headers)
headers - the headers to analyzetrue if the headers were cacheable, false if not.public static Header toLinkHeader(List<LinkDirective> linkDirectives)
public static List<LinkDirective> toLinkDirectives(Header header)
Copyright © 2008–2017. All rights reserved.