com.sun.jersey.core.header
Class HttpDateFormat

java.lang.Object
  extended by com.sun.jersey.core.header.HttpDateFormat

public class HttpDateFormat
extends Object

Helper class for HTTP specified date formats.

Author:
Paul.Sandoz@Sun.Com

Method Summary
static List<SimpleDateFormat> getDateFormats()
          Return an unmodifiable list of HTTP specified date formats to use for parsing or formating Date.
static SimpleDateFormat getPreferedDateFormat()
          Get the preferred HTTP specified date format (RFC 1123).
static Date readDate(String date)
          Read a date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDateFormats

public static List<SimpleDateFormat> getDateFormats()
Return an unmodifiable list of HTTP specified date formats to use for parsing or formating Date.

The list of date formats are scoped to the current thread and may be used without requiring to synchronize access to the instances when parsing or formatting.

Returns:
the list of data formats.

getPreferedDateFormat

public static SimpleDateFormat getPreferedDateFormat()
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


Copyright © 2013 Oracle Corporation. All Rights Reserved.