java.io
Class ObjectOutputStream.PutField

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.io.ObjectOutputStream.PutField
Enclosing class:
ObjectOutputStream sample code for java.io.ObjectOutputStream definition code for java.io.ObjectOutputStream

public abstract static class ObjectOutputStream.PutField
extends Object sample code for java.lang.Object definition code for java.lang.Object

Provide programmatic access to the persistent fields to be written to ObjectOutput.

Since:
1.2

Constructor Summary
ObjectOutputStream.PutField sample code for java.io.ObjectOutputStream.PutField.ObjectOutputStream.PutField() definition code for java.io.ObjectOutputStream.PutField.ObjectOutputStream.PutField() ()
           
 
Method Summary
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, boolean) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, boolean) (String sample code for java.lang.String definition code for java.lang.String  name, boolean val)
          Put the value of the named boolean field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, byte) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, byte) (String sample code for java.lang.String definition code for java.lang.String  name, byte val)
          Put the value of the named byte field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, char) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, char) (String sample code for java.lang.String definition code for java.lang.String  name, char val)
          Put the value of the named char field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, double) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, double) (String sample code for java.lang.String definition code for java.lang.String  name, double val)
          Put the value of the named double field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, float) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, float) (String sample code for java.lang.String definition code for java.lang.String  name, float val)
          Put the value of the named float field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, int) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, int) (String sample code for java.lang.String definition code for java.lang.String  name, int val)
          Put the value of the named int field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, long) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, long) (String sample code for java.lang.String definition code for java.lang.String  name, long val)
          Put the value of the named long field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, java.lang.Object) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  name, Object sample code for java.lang.Object definition code for java.lang.Object  val)
          Put the value of the named Object field into the persistent field.
abstract  void put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, short) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, short) (String sample code for java.lang.String definition code for java.lang.String  name, short val)
          Put the value of the named short field into the persistent field.
abstract  void write sample code for java.io.ObjectOutputStream.PutField.write(java.io.ObjectOutput) definition code for java.io.ObjectOutputStream.PutField.write(java.io.ObjectOutput) (ObjectOutput sample code for java.io.ObjectOutput definition code for java.io.ObjectOutput  out)
          Deprecated. This method does not write the values contained by this PutField object in a proper format, and may result in corruption of the serialization stream. The correct way to write PutField data is by calling the ObjectOutputStream.writeFields() sample code for java.io.ObjectOutputStream.writeFields() definition code for java.io.ObjectOutputStream.writeFields() method.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

ObjectOutputStream.PutField sample code for java.io.ObjectOutputStream.PutField() definition code for java.io.ObjectOutputStream.PutField()

public ObjectOutputStream.PutField()
Method Detail

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, boolean) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, boolean)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         boolean val)
Put the value of the named boolean field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, byte) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, byte)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         byte val)
Put the value of the named byte field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, char) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, char)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         char val)
Put the value of the named char field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, short) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, short)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         short val)
Put the value of the named short field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, int) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, int)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         int val)
Put the value of the named int field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, long) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, long)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         long val)
Put the value of the named long field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, float) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, float)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         float val)
Put the value of the named float field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, double) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, double)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         double val)
Put the value of the named double field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

put sample code for java.io.ObjectOutputStream.PutField.put(java.lang.String, java.lang.Object) definition code for java.io.ObjectOutputStream.PutField.put(java.lang.String, java.lang.Object)

public abstract void put(String sample code for java.lang.String definition code for java.lang.String  name,
                         Object sample code for java.lang.Object definition code for java.lang.Object  val)
Put the value of the named Object field into the persistent field.

Parameters:
name - the name of the serializable field
val - the value to assign to the field

write sample code for java.io.ObjectOutputStream.PutField.write(java.io.ObjectOutput) definition code for java.io.ObjectOutputStream.PutField.write(java.io.ObjectOutput)

@Deprecated
public abstract void write(ObjectOutput sample code for java.io.ObjectOutput definition code for java.io.ObjectOutput  out)
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Deprecated. This method does not write the values contained by this PutField object in a proper format, and may result in corruption of the serialization stream. The correct way to write PutField data is by calling the ObjectOutputStream.writeFields() sample code for java.io.ObjectOutputStream.writeFields() definition code for java.io.ObjectOutputStream.writeFields() method.

Write the data and fields to the specified ObjectOutput stream.

Parameters:
out - the stream to write the data and fields to
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if I/O errors occur while writing to the underlying stream