This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.io
class ObjectOutputStream.PutField

java.lang.Object extended by java.io.ObjectOutputStream.PutField
Enclosing class:
ObjectOutputStream

Most common way to construct:

ObjectOutputStream s = …;

ObjectOutputStream.PutField fields = s.putFields();

Based on 72 examples


public abstract static class ObjectOutputStream.PutField
extends Object

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


Constructor Summary

          
 
Method Summary
abstract void
put(String name, boolean val)

          Put the value of the named boolean field into the persistent field.
abstract void
put(String name, byte val)

          Put the value of the named byte field into the persistent field.
abstract void
put(String name, char val)

          Put the value of the named char field into the persistent field.
abstract void
put(String name, double val)

          Put the value of the named double field into the persistent field.
abstract void
put(String name, float val)

          Put the value of the named float field into the persistent field.
abstract void
put(String name, int val)

          Put the value of the named int field into the persistent field.
abstract void
put(String name, long val)

          Put the value of the named long field into the persistent field.
abstract void
put(String name, Object val)

          Put the value of the named Object field into the persistent field.
abstract void
put(String name, short val)

          Put the value of the named short field into the persistent field.
abstract void

          Write the data and fields to the specified ObjectOutput stream, which must be the same stream that produced this PutField object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectOutputStream.PutField

public ObjectOutputStream.PutField()
Method Detail

put

public abstract void put(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

public abstract void put(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

public abstract void put(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

public abstract void put(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

public abstract void put(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

public abstract void put(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

public abstract void put(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

public abstract void put(String name,
                         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 (which may be null)

put

public abstract void put(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

write

public abstract void write(ObjectOutput out)
                    throws IOException
Write the data and fields to the specified ObjectOutput stream, which must be the same stream that produced this PutField object.

Parameters:
out - the stream to write the data and fields to
Throws:
IOException - if I/O errors occur while writing to the underlying stream


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.