File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes Object Serialization Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "Object Serialization" Watch "Object Serialization" New topic
Author

Object Serialization

Satheesh Thekku Veethil
Greenhorn

Joined: Jan 31, 2002
Posts: 25
Consider a class containing a data set in Vector. I need to store it in a file thru serialzation so i can use a writeObject. Once this is in the file, whenever the data set changes i need to update the file. However with WriteObject, everytime the whole data set is written into the file. This can become a performance issue. For example if the Vector has 1000 entries and if it has been updated by 1, then to save it in the file i will still need to write 1000 entries + 1 which i feel is an overhead.
Can anyone tell me of a workaround to boost performance?? Need your comments asap.
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 512
Hmm.. Good question. I'm thinking if you knew exactly where the data was and it was a static length, you could write it using Random Access Files. I'm learning about file access so I can be totally off. .. hmmm Something to look into.
-Dale


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
 
 
subject: Object Serialization
 
Threads others viewed
Concurrency and caching
Performance question
saving data in a file based from Tree map
Applet to Servlet Communication
2 Very big files
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture