Class HttpDateFormat
java.lang.Object
org.glassfish.jersey.message.internal.HttpDateFormat
Helper class for HTTP specified date formats.
- Author:
- Paul Sandoz, Marek Potociar
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleDateFormat
Deprecated, for removal: This API element is subject to removal in a future version.Use getPreferredDateFormatter insteadGet the preferred HTTP specified date format (RFC 1123).static Date
Read a date.
-
Method Details
-
getPreferredDateFormatter
Get the preferred HTTP specified date format (RFC 1123).The date format is scoped to the current thread and may be used without requiring to synchronize access to the instance when parsing or formatting.
- Returns:
- the preferred of data format.
-
getPreferredDateFormat
Deprecated, for removal: This API element is subject to removal in a future version.Use getPreferredDateFormatter insteadGet the preferred HTTP specified date format (RFC 1123).The date format is scoped to the current thread and may be used without requiring to synchronize access to the instance when parsing or formatting.
- Returns:
- the preferred of data format.
-
readDate
Read a date.- Parameters:
date
- the date as a string.- Returns:
- the date
- Throws:
ParseException
- in case the date string cannot be parsed.
-