Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Read and Write Serialized Object to Random Access File

807607Dec 24 2006 — edited Dec 30 2006
hi,

i need to read and write at the same time to a file. i know about the RandomAccessFile class and the Serialization but as i look at the API documentation i can see the i will need an ObjectOUtputStream to write objects to a file which, as far as i know, i can only use FileOutputStream. i cannot use fileoutputstream since i need to both read and write to the file at the same time.

am i missing something here? what class can i use to read and write objects to a single file? can i write more than one object to a single file?

Message was edited by:
dhenjhidz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2007
Added on Dec 24 2006
5 comments
4,614 views