다음을 통해 공유


URLConnection.GetHeaderFieldDate(String, Int64) Method

Definition

Returns the value of the named field parsed as date.

[Android.Runtime.Register("getHeaderFieldDate", "(Ljava/lang/String;J)J", "GetGetHeaderFieldDate_Ljava_lang_String_JHandler")]
public virtual long GetHeaderFieldDate (string? name, long Default);
[<Android.Runtime.Register("getHeaderFieldDate", "(Ljava/lang/String;J)J", "GetGetHeaderFieldDate_Ljava_lang_String_JHandler")>]
abstract member GetHeaderFieldDate : string * int64 -> int64
override this.GetHeaderFieldDate : string * int64 -> int64

Parameters

name
String

the name of the header field.

Default
Int64

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.

Attributes

Remarks

Returns the value of the named field parsed as date. The result is the number of milliseconds 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.

Java documentation for java.net.URLConnection.getHeaderFieldDate(java.lang.String, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to