GetField
abstract class GetField
Provide access to the persistent fields read from the input stream.
Summary
Public methods |
abstract Boolean |
Return true if the named field is defaulted and has no value in this stream.
|
abstract Boolean |
Get the value of the named boolean field from the persistent field.
|
abstract Byte |
Get the value of the named byte field from the persistent field.
|
abstract Char |
Get the value of the named char field from the persistent field.
|
abstract Double |
Get the value of the named double field from the persistent field.
|
abstract Float |
Get the value of the named float field from the persistent field.
|
abstract Int |
Get the value of the named int field from the persistent field.
|
abstract Any! |
Get the value of the named Object field from the persistent field.
|
abstract Long |
Get the value of the named long field from the persistent field.
|
abstract Short |
Get the value of the named short field from the persistent field.
|
abstract ObjectStreamClass! |
Get the ObjectStreamClass that describes the fields in the stream.
|
Public constructors
Public methods
defaulted
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
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
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
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
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
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
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
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 |
get
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
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 |
getObjectStreamClass
abstract fun getObjectStreamClass(): ObjectStreamClass!
Get the ObjectStreamClass that describes the fields in the stream.
Return |
ObjectStreamClass! |
the descriptor class that describes the serializable fields |