FastHttpDateFormat,
but uses java.time API instead of the old java.util.Date/Calendar and java.text.DateFormat/SimpleDateFormat API.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | |
| private static String | cachedStringDate
Current formatted date. |
| private static byte[] | currentDateBytes
Current formatted date as byte[]. |
| private static volatile byte[] | |
| private static final ConcurrentMap | formatCache
Formatter cache. |
| private static final DateTimeFormatter | |
| private static final DateTimeFormatter[] | |
| private static final ZoneId | |
| private static final AtomicBoolean | |
| private static volatile long | nextGeneration
Instant on which the currentDate object was generated. |
| private static final ConcurrentMap | parseCache
Parser cache. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | formatDate(long
in milli-seconds value, DateTimeFormatter the formatter)DateTimeFormatter used if cache value was not foundGet the HTTP format of the specified date. |
| public static String | |
| public static byte[] | |
| private static long | internalParseDate(final String value, final DateTimeFormatter[] formatters)
Parse date with given formatters. |
| public static long | parseDate(final String value, final DateTimeFormatter[] formatters)
Try to parse the given date as a HTTP date. |
| private static void | |
| private static void |
| ASCII_CHARSET_NAME | back to summary |
|---|---|
| private static final String ASCII_CHARSET_NAME | |
| CACHE_SIZE | back to summary |
|---|---|
| private static final int CACHE_SIZE | |
| cachedStringDate | back to summary |
|---|---|
| private static String cachedStringDate Current formatted date. | |
| currentDateBytes | back to summary |
|---|---|
| private static byte[] currentDateBytes Current formatted date as byte[]. | |
| dateBytesForCachedStringDate | back to summary |
|---|---|
| private static volatile byte[] dateBytesForCachedStringDate | |
| formatCache | back to summary |
|---|---|
| private static final ConcurrentMap<Long, String> formatCache Formatter cache. | |
| FORMATTER | back to summary |
|---|---|
| private static final DateTimeFormatter FORMATTER | |
| FORMATTERS | back to summary |
|---|---|
| private static final DateTimeFormatter[] FORMATTERS | |
| GMT_ZONE_ID | back to summary |
|---|---|
| private static final ZoneId GMT_ZONE_ID | |
| isGeneratingNow | back to summary |
|---|---|
| private static final AtomicBoolean isGeneratingNow | |
| nextGeneration | back to summary |
|---|---|
| private static volatile long nextGeneration Instant on which the currentDate object was generated. | |
| parseCache | back to summary |
|---|---|
| private static final ConcurrentMap<String, Long> parseCache Parser cache. | |
| HttpDateFormat | back to summary |
|---|---|
| public HttpDateFormat() | |
| formatDate | back to summary |
|---|---|
| public static String formatDate(long value, DateTimeFormatter formatter) Get the HTTP format of the specified date.
| |
| getCurrentDate | back to summary |
|---|---|
| public static String getCurrentDate() Get the current date in HTTP format. | |
| getCurrentDateBytes | back to summary |
|---|---|
| public static byte[] getCurrentDateBytes() Get the current date in HTTP format. | |
| internalParseDate | back to summary |
|---|---|
| private static long internalParseDate(final String value, final DateTimeFormatter[] formatters) Parse date with given formatters. | |
| parseDate | back to summary |
|---|---|
| public static long parseDate(final String value, final DateTimeFormatter[] formatters) Try to parse the given date as a HTTP date. | |
| updateFormatCache | back to summary |
|---|---|
| private static void updateFormatCache(Long key, String value) Update cache. | |
| updateParseCache | back to summary |
|---|---|
| private static void updateParseCache(String key, Long value) Update cache. | |