Package org.eclipse.jetty.http
Class DateGenerator
- java.lang.Object
-
- org.eclipse.jetty.http.DateGenerator
-
public class DateGenerator extends Object
ThreadLocal Date formatters for HTTP style dates.
-
-
Field Summary
Fields Modifier and Type Field Description static String__01Jan1970
-
Constructor Summary
Constructors Constructor Description DateGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFormatCookieDate(StringBuilder buf, long date)Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookiesStringdoFormatDate(long date)Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"static StringformatCookieDate(long date)Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookiesstatic voidformatCookieDate(StringBuilder buf, long date)Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookiesstatic StringformatDate(long date)Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"
-
-
-
Field Detail
-
__01Jan1970
public static final String __01Jan1970
-
-
Method Detail
-
formatDate
public static String formatDate(long date)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"- Parameters:
date- the date in milliseconds- Returns:
- the formatted date
-
formatCookieDate
public static void formatCookieDate(StringBuilder buf, long date)
Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies- Parameters:
buf- the buffer to put the formatted date intodate- the date in milliseconds
-
formatCookieDate
public static String formatCookieDate(long date)
Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies- Parameters:
date- the date in milliseconds- Returns:
- the formatted date
-
doFormatDate
public String doFormatDate(long date)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'"- Parameters:
date- the date in milliseconds- Returns:
- the formatted date
-
doFormatCookieDate
public void doFormatCookieDate(StringBuilder buf, long date)
Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookies- Parameters:
buf- the buffer to format the date intodate- the date in milliseconds
-
-