Class HttpDateFormat
- java.lang.Object
-
- org.glassfish.jersey.message.internal.HttpDateFormat
-
public final class HttpDateFormat extends Object
Helper class for HTTP specified date formats.- Author:
- Paul Sandoz, Marek Potociar
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SimpleDateFormat
getPreferredDateFormat()
Get the preferred HTTP specified date format (RFC 1123).static Date
readDate(String date)
Read a date.
-
-
-
Method Detail
-
getPreferredDateFormat
public static SimpleDateFormat getPreferredDateFormat()
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.
-
readDate
public static Date readDate(String date) throws ParseException
Read a date.- Parameters:
date
- the date as a string.- Returns:
- the date
- Throws:
ParseException
- in case the date string cannot be parsed.
-
-