|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.ObjectOutputStream.PutField java.io.ObjectOutputStream.PutFieldImpl
Default PutField implementation.
Field Summary | |
private ObjectStreamClass |
desc
class descriptor describing serializable fields |
private Object[] |
objVals
object field values |
private byte[] |
primVals
primitive field values |
Constructor Summary | |
(package private) |
ObjectOutputStream.PutFieldImpl(ObjectStreamClass desc)
Creates PutFieldImpl object for writing fields defined in given class descriptor. |
Method Summary | |
private int |
getFieldOffset(String name,
Class type)
Returns offset of field with given name and type. |
void |
put(String name,
boolean val)
Put the value of the named boolean field into the persistent field. |
void |
put(String name,
byte val)
Put the value of the named byte field into the persistent field. |
void |
put(String name,
char val)
Put the value of the named char field into the persistent field. |
void |
put(String name,
double val)
Put the value of the named double field into the persistent field. |
void |
put(String name,
float val)
Put the value of the named float field into the persistent field. |
void |
put(String name,
int val)
Put the value of the named int field into the persistent field. |
void |
put(String name,
long val)
Put the value of the named long field into the persistent field. |
void |
put(String name,
Object val)
Put the value of the named Object field into the persistent field. |
void |
put(String name,
short val)
Put the value of the named short field into the persistent field. |
void |
write(ObjectOutput out)
Write the data and fields to the specified ObjectOutput stream. |
(package private) void |
writeFields()
Writes buffered primitive data and object fields to stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final ObjectStreamClass desc
private final byte[] primVals
private final Object[] objVals
Constructor Detail |
ObjectOutputStream.PutFieldImpl(ObjectStreamClass desc)
Method Detail |
public void put(String name, boolean val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, byte val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, char val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, short val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, int val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, float val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, long val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, double val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void put(String name, Object val)
ObjectOutputStream.PutField
put
in class ObjectOutputStream.PutField
name
- the name of the serializable fieldval
- the value to assign to the fieldpublic void write(ObjectOutput out) throws IOException
ObjectOutputStream.PutField
write
in class ObjectOutputStream.PutField
out
- the stream to write the data and fields to
IOException
- if I/O errors occur while writing to the
underlying streamvoid writeFields() throws IOException
IOException
private int getFieldOffset(String name, Class type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |