URLConnection.GetHeaderFieldLong(String, Int64) Method

Definition

Returns the value of the named field parsed as a number.

[Android.Runtime.Register("getHeaderFieldLong", "(Ljava/lang/String;J)J", "GetGetHeaderFieldLong_Ljava_lang_String_JHandler", ApiSince=24)]
public virtual long GetHeaderFieldLong (string? name, long Default);
[<Android.Runtime.Register("getHeaderFieldLong", "(Ljava/lang/String;J)J", "GetGetHeaderFieldLong_Ljava_lang_String_JHandler", ApiSince=24)>]
abstract member GetHeaderFieldLong : string * int64 -> int64
override this.GetHeaderFieldLong : string * int64 -> int64

Parameters

name
String

the name of the header field.

Default
Int64

the default value.

Returns

the value of the named field, parsed as a long. The Default value is returned if the field is missing or malformed.

Attributes

Remarks

Returns the value of the named field parsed as a number.

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.

Added in 7.0.

Java documentation for java.net.URLConnection.getHeaderFieldLong(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