Top Description Inners Fields Constructors Methods
io.netty.handler.codec.http

public final Class HttpHeaderDateFormat

extends SimpleDateFormat
Class Inheritance
Annotations
@Deprecated
Imports
io.netty.util.concurrent.FastThreadLocal, io.netty.handler.codec.DateFormatter, java.text.ParsePosition, .SimpleDateFormat, java.util.Date, .Locale, .TimeZone

Deprecated

Use DateFormatter instead

This DateFormat decodes 3 formats of Date, but only encodes the one, the first:

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
HttpHeaderDateFormat.HttpHeaderDateFormatObsolete1

First obsolete format

Sunday, 06-Nov-94 08:49:37 GMT -> E, d-MMM-y HH:mm:ss z

private static class
HttpHeaderDateFormat.HttpHeaderDateFormatObsolete2

Second obsolete format

Sun Nov 6 08:49:37 1994 -> EEE, MMM d HH:mm:ss yyyy

Field Summary

Modifier and TypeField and Description
private static final FastThreadLocal<HttpHeaderDateFormat>
private final SimpleDateFormat
private final SimpleDateFormat
private static final long

Constructor Summary

AccessConstructor and Description
private
HttpHeaderDateFormat()

Standard date format

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

Method Summary

Modifier and TypeMethod and Description
public static HttpHeaderDateFormat
get()

Deprecated as a consequence of HttpHeaderDateFormat being deprecated.
public Date
parse(String
A String, part of which should be parsed.
text
,
ParsePosition
A ParsePosition object with index and error index information as described above.
pos
)

Overrides java.text.SimpleDateFormat.parse.

Parses text from a string to produce a Date.
Inherited from java.text.SimpleDateFormat:
applyLocalizedPatternapplyPatterncloneequalsformatformatToCharacterIteratorget2DigitYearStartgetDateFormatSymbolshashCodeset2DigitYearStartsetDateFormatSymbolstoLocalizedPatterntoPattern

Field Detail

dateFormatThreadLocalback to summary
private static final FastThreadLocal<HttpHeaderDateFormat> dateFormatThreadLocal
format1back to summary
private final SimpleDateFormat format1
format2back to summary
private final SimpleDateFormat format2
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.text.SimpleDateFormat.serialVersionUID.

Constructor Detail

HttpHeaderDateFormatback to summary
private HttpHeaderDateFormat()

Standard date format

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

Method Detail

getback to summary
public static HttpHeaderDateFormat get()

Deprecated

as a consequence of HttpHeaderDateFormat being deprecated. See corresponding docs for further information.

parseback to summary
public Date parse(String text, ParsePosition pos)

Overrides java.text.SimpleDateFormat.parse.

Doc from java.text.SimpleDateFormat.parse.

Parses text from a string to produce a Date.

The method attempts to parse text starting at the index given by pos. If parsing succeeds, then the index of pos is updated to the index after the last character used (parsing does not necessarily use all characters up to the end of the string), and the parsed date is returned. The updated pos can be used to indicate the starting point for the next call to this method. If an error occurs, then the index of pos is not changed, the error index of pos is set to the index of the character where the error occurred, and null is returned.

This parsing operation uses the calendar to produce a Date. All of the calendar's date-time fields are cleared before parsing, and the calendar's default values of the date-time fields are used for any missing date-time information. For example, the year value of the parsed Date is 1970 with GregorianCalendar if no year value is given from the parsing operation. The TimeZone value may be overwritten, depending on the given pattern and the time zone value in text. Any TimeZone value that has previously been set by a call to setTimeZone may need to be restored for further operations.

Parameters
text:String

A String, part of which should be parsed.

pos:ParsePosition

A ParsePosition object with index and error index information as described above.

Returns:Date

A Date parsed from the string. In case of error, returns null.

Annotations
@Override
io.netty.handler.codec.http back to summary

private final Class HttpHeaderDateFormat.HttpHeaderDateFormatObsolete1

extends SimpleDateFormat
Class Inheritance

First obsolete format

Sunday, 06-Nov-94 08:49:37 GMT -> E, d-MMM-y HH:mm:ss z

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.text.SimpleDateFormat:
applyLocalizedPatternapplyPatterncloneequalsformatformatToCharacterIteratorget2DigitYearStartgetDateFormatSymbolshashCodeparseset2DigitYearStartsetDateFormatSymbolstoLocalizedPatterntoPattern

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.text.SimpleDateFormat.serialVersionUID.

Constructor Detail

HttpHeaderDateFormatObsolete1back to summary
pack-priv HttpHeaderDateFormatObsolete1()
io.netty.handler.codec.http back to summary

private final Class HttpHeaderDateFormat.HttpHeaderDateFormatObsolete2

extends SimpleDateFormat
Class Inheritance

Second obsolete format

Sun Nov 6 08:49:37 1994 -> EEE, MMM d HH:mm:ss yyyy

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.text.SimpleDateFormat:
applyLocalizedPatternapplyPatterncloneequalsformatformatToCharacterIteratorget2DigitYearStartgetDateFormatSymbolshashCodeparseset2DigitYearStartsetDateFormatSymbolstoLocalizedPatterntoPattern

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.text.SimpleDateFormat.serialVersionUID.

Constructor Detail

HttpHeaderDateFormatObsolete2back to summary
pack-priv HttpHeaderDateFormatObsolete2()