Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static abstract class

ObjectOutputStream.PutField

extends Object
java.lang.Object
   ↳ java.io.ObjectOutputStream.PutField

Class Overview

PutField is an inner class to provide access to the persistent fields that are written to the target stream.

Summary

Public Constructors
ObjectOutputStream.PutField ()
Public Methods
abstract void put ( String name, Object value)
Puts the value of the Object field identified by name to the persistent field.
abstract void put ( String name, int value)
Puts the value of the integer field identified by name to the persistent field.
abstract void put ( String name, float value)
Puts the value of the float field identified by name to the persistent field.
abstract void put ( String name, boolean value)
Puts the value of the boolean field identified by name to the persistent field.
abstract void put ( String name, byte value)
Puts the value of the byte field identified by name to the persistent field.
abstract void put ( String name, short value)
Puts the value of the short field identified by name to the persistent field.
abstract void put ( String name, long value)
Puts the value of the long field identified by name to the persistent field.
abstract void put ( String name, char value)
Puts the value of the character field identified by name to the persistent field.
abstract void put ( String name, double value)
Puts the value of the double field identified by name to the persistent field.
abstract void write ( ObjectOutput out)
This method was deprecated in API level 1. This method is unsafe and may corrupt the target stream. Use ObjectOutputStream#writeFields() instead.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ObjectOutputStream.PutField ()

Added in API level 1

Public Methods

public abstract void put ( String name, Object value)

Added in API level 1

Puts the value of the Object field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, int value)

Added in API level 1

Puts the value of the integer field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, float value)

Added in API level 1

Puts the value of the float field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, boolean value)

Added in API level 1

Puts the value of the boolean field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, byte value)

Added in API level 1

Puts the value of the byte field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, short value)

Added in API level 1

Puts the value of the short field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, long value)

Added in API level 1

Puts the value of the long field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, char value)

Added in API level 1

Puts the value of the character field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void put ( String name, double value)

Added in API level 1

Puts the value of the double field identified by name to the persistent field.

Parameters
name the name of the field to serialize.
value the value that is put to the persistent field.

public abstract void write ( ObjectOutput out)

Added in API level 1

This method was deprecated in API level 1.
This method is unsafe and may corrupt the target stream. Use ObjectOutputStream#writeFields() instead.

Writes the fields to the target stream out .

Parameters
out the target stream
Throws
IOException if an error occurs while writing to the target stream.