| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final AtomicReference | |
| private static final String | |
| private static final ThreadLocal | |
| private static final TimeZone | |
| private static final Runnable | INVALIDATE_TASK
Invalidates the current date |
| private static final Locale | |
| private static final ThreadLocal | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final ThreadLocal | RFC1123_PATTERN_FORMAT
Thread local cache of this date format. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static String | |
| public static boolean | handleIfModifiedSince(final HttpServerExchange
the exchange exchange, final Date The last modified date lastModified)Handles the if-modified-since header. |
| public static boolean | handleIfModifiedSince(final String
the modified since date modifiedSince, final Date The last modified date lastModified)Handles the if-modified-since header. |
| public static boolean | handleIfUnmodifiedSince(final HttpServerExchange
the exchange exchange, final Date The last modified date lastModified)Handles the if-unmodified-since header. |
| public static boolean | handleIfUnmodifiedSince(final String
the if unmodified since date modifiedSince, final Date The last modified date lastModified)Handles the if-unmodified-since header. |
| public static Date | |
| public static String | |
| public static String | Returns: The RFC-1123 formatted dateThe date date)Converts a date to a format suitable for use in a HTTP request |
| public static String |
| ASCITIME_PATTERN | back to summary |
|---|---|
| private static final String ASCITIME_PATTERN | |
| cachedDateString | back to summary |
|---|---|
| private static final AtomicReference<String> cachedDateString | |
| COMMON_LOG_PATTERN | back to summary |
|---|---|
| private static final String COMMON_LOG_PATTERN | |
| COMMON_LOG_PATTERN_FORMAT | back to summary |
|---|---|
| private static final ThreadLocal<SimpleDateFormat> COMMON_LOG_PATTERN_FORMAT | |
| GMT_ZONE | back to summary |
|---|---|
| private static final TimeZone GMT_ZONE | |
| INVALIDATE_TASK | back to summary |
|---|---|
| private static final Runnable INVALIDATE_TASK Invalidates the current date | |
| LOCALE_US | back to summary |
|---|---|
| private static final Locale LOCALE_US | |
| OLD_COOKIE_FORMAT | back to summary |
|---|---|
| private static final ThreadLocal<SimpleDateFormat> OLD_COOKIE_FORMAT | |
| OLD_COOKIE_PATTERN | back to summary |
|---|---|
| private static final String OLD_COOKIE_PATTERN | |
| RFC1036_PATTERN | back to summary |
|---|---|
| private static final String RFC1036_PATTERN | |
| RFC1123_PATTERN | back to summary |
|---|---|
| private static final String RFC1123_PATTERN | |
| RFC1123_PATTERN_FORMAT | back to summary |
|---|---|
| private static final ThreadLocal<SimpleDateFormat> RFC1123_PATTERN_FORMAT Thread local cache of this date format. This is technically a small memory leak, however in practice it is fine, as it will only be used by server threads. This is the most common date format, which is why we cache it. | |
| DateUtils | back to summary |
|---|---|
| private DateUtils() | |
| addDateHeaderIfRequired | back to summary |
|---|---|
| public static void addDateHeaderIfRequired(HttpServerExchange exchange) | |
| getCurrentDateTime | back to summary |
|---|---|
| public static String getCurrentDateTime(HttpServerExchange exchange) | |
| handleIfModifiedSince | back to summary |
|---|---|
| public static boolean handleIfModifiedSince(final HttpServerExchange exchange, final Date lastModified) Handles the if-modified-since header. returns true if the request should proceed, false otherwise
| |
| handleIfModifiedSince | back to summary |
|---|---|
| public static boolean handleIfModifiedSince(final String modifiedSince, final Date lastModified) Handles the if-modified-since header. returns true if the request should proceed, false otherwise | |
| handleIfUnmodifiedSince | back to summary |
|---|---|
| public static boolean handleIfUnmodifiedSince(final HttpServerExchange exchange, final Date lastModified) Handles the if-unmodified-since header. returns true if the request should proceed, false otherwise
| |
| handleIfUnmodifiedSince | back to summary |
|---|---|
| public static boolean handleIfUnmodifiedSince(final String modifiedSince, final Date lastModified) Handles the if-unmodified-since header. returns true if the request should proceed, false otherwise | |
| parseDate | back to summary |
|---|---|
| public static Date parseDate(final String date) Attempts to pass a HTTP date. | |
| toCommonLogFormat | back to summary |
|---|---|
| public static String toCommonLogFormat(final Date date) | |
| toDateString | back to summary |
|---|---|
| public static String toDateString(final Date date) Converts a date to a format suitable for use in a HTTP request | |
| toOldCookieDateString | back to summary |
|---|---|
| public static String toOldCookieDateString(final Date date) | |