Added in API level 1

GetField

abstract class GetField
kotlin.Any
   ↳ java.io.ObjectInputStream.GetField

Provide access to the persistent fields read from the input stream.

Summary

Public constructors

Public methods
abstract Boolean
defaulted(name: String!)

Return true if the named field is defaulted and has no value in this stream.

abstract Boolean
get(name: String!, val: Boolean)

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

abstract Byte
get(name: String!, val: Byte)

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

abstract Char
get(name: String!, val: Char)

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

abstract Short
get(name: String!, val: Short)

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

abstract Int
get(name: String!, val: Int)

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

abstract Long
get(name: String!, val: Long)

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

abstract Float
get(name: String!, val: Float)

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

abstract Double
get(name: String!, val: Double)

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

abstract Any!
get(name: String!, val: Any!)

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

abstract ObjectStreamClass!

Get the ObjectStreamClass that describes the fields in the stream.

Public constructors

GetField

Added in API level 1
GetField()

Public methods

defaulted

Added in API level 1
abstract fun defaulted(name: String!): Boolean

Return true if the named field is defaulted and has no value in this stream.

Parameters
name String!: the name of the field
Return
Boolean true, if and only if the named field is defaulted
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if name does not correspond to a serializable field

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Boolean
): Boolean

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

Parameters
name String!: the name of the field
val Boolean: the default value to use if name does not have a value
Return
Boolean the value of the named boolean field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Byte
): Byte

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

Parameters
name String!: the name of the field
val Byte: the default value to use if name does not have a value
Return
Byte the value of the named byte field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Char
): Char

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

Parameters
name String!: the name of the field
val Char: the default value to use if name does not have a value
Return
Char the value of the named char field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Short
): Short

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

Parameters
name String!: the name of the field
val Short: the default value to use if name does not have a value
Return
Short the value of the named short field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Int
): Int

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

Parameters
name String!: the name of the field
val Int: the default value to use if name does not have a value
Return
Int the value of the named int field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Long
): Long

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

Parameters
name String!: the name of the field
val Long: the default value to use if name does not have a value
Return
Long the value of the named long field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Float
): Float

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

Parameters
name String!: the name of the field
val Float: the default value to use if name does not have a value
Return
Float the value of the named float field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Double
): Double

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

Parameters
name String!: the name of the field
val Double: the default value to use if name does not have a value
Return
Double the value of the named double field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

get

Added in API level 1
abstract fun get(
    name: String!,
    val: Any!
): Any!

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

Parameters
name String!: the name of the field
val Any!: the default value to use if name does not have a value
Return
Any! the value of the named Object field
Exceptions
java.io.IOException if there are I/O errors while reading from the underlying InputStream
java.lang.IllegalArgumentException if type of name is not serializable or if the field type is incorrect

getObjectStreamClass

Added in API level 1
abstract fun getObjectStreamClass(): ObjectStreamClass!

Get the ObjectStreamClass that describes the fields in the stream.

Return
ObjectStreamClass! the descriptor class that describes the serializable fields