hipal
asked on
serializing multiple objects in the same file
Thanks experts for extended support..
Can some one please give a simple example of serializing multiple objects in the same file and deserializing them
Can some one please give a simple example of serializing multiple objects in the same file and deserializing them
Just call oos.writeObject several times with the corresponding ois.readObject
ASKER
so what if I want to read 4th object that I wrote ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
add them to a ArrayList (or array) and then serialize/deserialize the list/array
that will handle reading/writing all objects in one call
that will handle reading/writing all objects in one call
:)