pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.time
Class HTTPDate

java.lang.Object
  extended by org.torweg.pulse.util.time.HTTPDate

public final class HTTPDate
extends java.lang.Object

utility to produce HTTP date string conformant to RFCs 2068, 822, 1123.

Version:
$Revision: 1417 $
Author:
Thomas Weber

Field Summary
static java.lang.String HTTP_DATE_FORMAT
          HTTP Date format pattern (RFC 2068, 822, 1123).
 
Method Summary
static java.lang.String get(java.util.Calendar calendar)
          returns an HTTP date conforming to RFCs 2068, 822, 1123.
static java.lang.String get(java.util.Date date)
          returns an HTTP date conforming to RFCs 2068, 822, 1123.
static java.lang.String get(long timestamp)
          returns an HTTP date conforming to RFCs 2068, 822, 1123.
static java.text.DateFormat getDateFormat()
          returns a DateFormat to format RFC compliant HTTP dates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_DATE_FORMAT

public static final java.lang.String HTTP_DATE_FORMAT
HTTP Date format pattern (RFC 2068, 822, 1123).

See Also:
Constant Field Values
Method Detail

get

public static java.lang.String get(long timestamp)
returns an HTTP date conforming to RFCs 2068, 822, 1123.

Parameters:
timestamp - the timestamp
Returns:
an RFC compliant date string

get

public static java.lang.String get(java.util.Date date)
returns an HTTP date conforming to RFCs 2068, 822, 1123.

Parameters:
date - the date
Returns:
an RFC compliant date string

get

public static java.lang.String get(java.util.Calendar calendar)
returns an HTTP date conforming to RFCs 2068, 822, 1123.

Parameters:
calendar - the calendar
Returns:
an RFC compliant date string

getDateFormat

public static java.text.DateFormat getDateFormat()
returns a DateFormat to format RFC compliant HTTP dates.

Returns:
an RFC compliant DateFormat