Class FastHttpDateFormat

java.lang.Object
org.glassfish.grizzly.http.util.FastHttpDateFormat

@Deprecated public final class FastHttpDateFormat extends Object
Deprecated.
Utility class to generate HTTP dates.
Author:
Gustav Trede, Remy Maucherat
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    formatDate(long value, DateFormat threadLocalFormat)
    Deprecated.
    Get the HTTP format of the specified date.
    http spec only require second precision http://tools.ietf.org/html/rfc2616#page-20
    therefore we don't use the millisecond precision , but second . truncation is done in the same way for second precision in SimpleDateFormat:
    (999 millisec. = 0 sec.)
    static String
    Deprecated.
    Get the current date in HTTP format.
    static byte[]
    Deprecated.
    Get the current date in HTTP format.
    static long
    parseDate(String value, DateFormat[] threadLocalformats)
    Deprecated.
    Try to parse the given date as a HTTP date.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FastHttpDateFormat

      public FastHttpDateFormat()
      Deprecated.
  • Method Details

    • getCurrentDate

      public static String getCurrentDate()
      Deprecated.
      Get the current date in HTTP format.
    • getCurrentDateBytes

      public static byte[] getCurrentDateBytes()
      Deprecated.
      Get the current date in HTTP format.
    • formatDate

      public static String formatDate(long value, DateFormat threadLocalFormat)
      Deprecated.
      Get the HTTP format of the specified date.
      http spec only require second precision http://tools.ietf.org/html/rfc2616#page-20
      therefore we don't use the millisecond precision , but second . truncation is done in the same way for second precision in SimpleDateFormat:
      (999 millisec. = 0 sec.)
      Parameters:
      value - in milli-seconds
      threadLocalFormat - the DateFormat used if cache value was not found
    • parseDate

      public static long parseDate(String value, DateFormat[] threadLocalformats)
      Deprecated.
      Try to parse the given date as a HTTP date.