Freigeben über


ObjectInputStream.GetField.Get Method

Definition

Overloads

Get(String, Object)

Get the value of the named Object field from the persistent field.

Get(String, Boolean)

Get the value of the named boolean field from the persistent field.

Get(String, Char)

Get the value of the named char field from the persistent field.

Get(String, Double)

Get the value of the named double field from the persistent field.

Get(String, Int16)

Get the value of the named short field from the persistent field.

Get(String, Int32)

Get the value of the named int field from the persistent field.

Get(String, Int64)

Get the value of the named long field from the persistent field.

Get(String, SByte)

Get the value of the named byte field from the persistent field.

Get(String, Single)

Get the value of the named float field from the persistent field.

Get(String, Object)

Get the value of the named Object field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;", "GetGet_Ljava_lang_String_Ljava_lang_Object_Handler")]
public abstract Java.Lang.Object Get (string name, Java.Lang.Object val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;", "GetGet_Ljava_lang_String_Ljava_lang_Object_Handler")>]
abstract member Get : string * Java.Lang.Object -> Java.Lang.Object

Parameters

name
String

the name of the field

val
Object

the default value to use if name does not have a value

Returns

the value of the named Object field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not Object.

Remarks

Get the value of the named Object field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, java.lang.Object).

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

Get(String, Boolean)

Get the value of the named boolean field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;Z)Z", "GetGet_Ljava_lang_String_ZHandler")]
public abstract bool Get (string name, bool val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;Z)Z", "GetGet_Ljava_lang_String_ZHandler")>]
abstract member Get : string * bool -> bool

Parameters

name
String

the name of the field

val
Boolean

the default value to use if name does not have a value

Returns

the value of the named boolean field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not boolean.

Remarks

Get the value of the named boolean field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, boolean).

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

Get(String, Char)

Get the value of the named char field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;C)C", "GetGet_Ljava_lang_String_CHandler")]
public abstract char Get (string name, char val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;C)C", "GetGet_Ljava_lang_String_CHandler")>]
abstract member Get : string * char -> char

Parameters

name
String

the name of the field

val
Char

the default value to use if name does not have a value

Returns

the value of the named char field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not char.

Remarks

Get the value of the named char field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, char).

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

Get(String, Double)

Get the value of the named double field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;D)D", "GetGet_Ljava_lang_String_DHandler")]
public abstract double Get (string name, double val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;D)D", "GetGet_Ljava_lang_String_DHandler")>]
abstract member Get : string * double -> double

Parameters

name
String

the name of the field

val
Double

the default value to use if name does not have a value

Returns

the value of the named double field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not double.

Remarks

Get the value of the named double field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, double).

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

Get(String, Int16)

Get the value of the named short field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;S)S", "GetGet_Ljava_lang_String_SHandler")]
public abstract short Get (string name, short val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;S)S", "GetGet_Ljava_lang_String_SHandler")>]
abstract member Get : string * int16 -> int16

Parameters

name
String

the name of the field

val
Int16

the default value to use if name does not have a value

Returns

the value of the named short field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not short.

Remarks

Get the value of the named short field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, short).

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

Get(String, Int32)

Get the value of the named int field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;I)I", "GetGet_Ljava_lang_String_IHandler")]
public abstract int Get (string name, int val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;I)I", "GetGet_Ljava_lang_String_IHandler")>]
abstract member Get : string * int -> int

Parameters

name
String

the name of the field

val
Int32

the default value to use if name does not have a value

Returns

the value of the named int field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not int.

Remarks

Get the value of the named int field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, int).

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

Get(String, Int64)

Get the value of the named long field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;J)J", "GetGet_Ljava_lang_String_JHandler")]
public abstract long Get (string name, long val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;J)J", "GetGet_Ljava_lang_String_JHandler")>]
abstract member Get : string * int64 -> int64

Parameters

name
String

the name of the field

val
Int64

the default value to use if name does not have a value

Returns

the value of the named long field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not long.

Remarks

Get the value of the named long field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(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

Get(String, SByte)

Get the value of the named byte field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;B)B", "GetGet_Ljava_lang_String_BHandler")]
public abstract sbyte Get (string name, sbyte val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;B)B", "GetGet_Ljava_lang_String_BHandler")>]
abstract member Get : string * sbyte -> sbyte

Parameters

name
String

the name of the field

val
SByte

the default value to use if name does not have a value

Returns

the value of the named byte field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not byte.

Remarks

Get the value of the named byte field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, byte).

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

Get(String, Single)

Get the value of the named float field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;F)F", "GetGet_Ljava_lang_String_FHandler")]
public abstract float Get (string name, float val);
[<Android.Runtime.Register("get", "(Ljava/lang/String;F)F", "GetGet_Ljava_lang_String_FHandler")>]
abstract member Get : string * single -> single

Parameters

name
String

the name of the field

val
Single

the default value to use if name does not have a value

Returns

the value of the named float field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by float is not char.

Remarks

Get the value of the named float field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, float).

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