Class HttpHeaderDateFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public final class HttpHeaderDateFormat
    extends java.text.SimpleDateFormat
    This DateFormat decodes 3 formats of Date, but only encodes the one, the first:
    • Sun, 06 Nov 1994 08:49:37 GMT: standard specification, the only one with valid generation
    • Sun, 06 Nov 1994 08:49:37 GMT: obsolete specification
    • Sun Nov 6 08:49:37 1994: obsolete specification
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.ThreadLocal<HttpHeaderDateFormat> FORMAT_THREAD_LOCAL  
      private java.text.SimpleDateFormat format1  
      private java.text.SimpleDateFormat format2  
      private static long serialVersionUID  
      • Fields inherited from class java.text.DateFormat

        AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private HttpHeaderDateFormat()
      Standard date format
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static HttpHeaderDateFormat get()  
      java.util.Date parse​(java.lang.String text, java.text.ParsePosition pos)  
      • Methods inherited from class java.text.SimpleDateFormat

        applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, get2DigitYearStart, getDateFormatSymbols, hashCode, set2DigitYearStart, setDateFormatSymbols, toLocalizedPattern, toPattern
      • Methods inherited from class java.text.DateFormat

        format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone
      • Methods inherited from class java.text.Format

        format, parseObject
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • format1

        private final java.text.SimpleDateFormat format1
      • format2

        private final java.text.SimpleDateFormat format2
      • FORMAT_THREAD_LOCAL

        private static final java.lang.ThreadLocal<HttpHeaderDateFormat> FORMAT_THREAD_LOCAL
    • Constructor Detail

      • HttpHeaderDateFormat

        private HttpHeaderDateFormat()
        Standard date format

        Sun, 06 Nov 1994 08:49:37 GMT -> E, d MMM yyyy HH:mm:ss z

    • Method Detail

      • parse

        public java.util.Date parse​(java.lang.String text,
                                    java.text.ParsePosition pos)
        Overrides:
        parse in class java.text.SimpleDateFormat