URLConnection.getHeaderFieldDate

URLConnection.getHeaderFieldDate

Class Overview | Class Members | This Package | All Packages

Syntax
public long getHeaderFieldDate( String name, long Default )
Parameters
name
the name of the header field.
Default
a default value.
Returns
the value of the field, parsed as a date. The value of the Default argument is returned if the field is missing or malformed.
Description
Returns the value of the named field parsed as date. The result is the number of seconds since January 1, 1970 GMT represented by the named field.

This form of getHeaderField exists because some connection types (e.g., http-ng) have pre-parsed headers. Classes for that connection type can override this method and short-circuit the parsing.