public abstract static class ObjectOutputStream.PutField extends Object
| Constructor and Description |
|---|
PutField() |
| Modifier and Type | Method and Description |
|---|---|
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,
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 |
put(String name,
float value)
Puts the value of the float 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,
long value)
Puts the value of the long field identified by
name to the
persistent field. |
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,
short value)
Puts the value of the short field identified by
name to the
persistent field. |
abstract void |
write(ObjectOutput out)
Deprecated.
This method is unsafe and may corrupt the target stream.
Use ObjectOutputStream#writeFields() instead.
|
public abstract void put(String name, boolean value)
name to the
persistent field.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)
name to
the persistent field.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)
name to the
persistent field.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)
name to the
persistent field.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)
name to the
persistent field.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)
name to the
persistent field.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)
name to the
persistent field.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)
name to the
persistent field.name - the name of the field to serialize.value - the value that is put to the persistent field.public abstract void put(String name, Object value)
name to the
persistent field.name - the name of the field to serialize.value - the value that is put to the persistent field.@Deprecated public abstract void write(ObjectOutput out) throws IOException
out.out - the target streamIOException - if an error occurs while writing to the target stream.