info on object serialization and file indexing?

J

Jeffrey Drew

I need to write objects representing a time series to a file, then read
subsets. I know I need an index and seek on that. I have no problem
writing serialized objects and reading them. Now I need to combine indices
and serialized objects. Does anyone know of an example or writing on this
technique?

Thanks

Jeff
 
P

Paul Lutus

Jeffrey said:
I need to write objects representing a time series to a file, then read
subsets. I know I need an index and seek on that. I have no problem
writing serialized objects and reading them. Now I need to combine
indices
and serialized objects. Does anyone know of an example or writing on
this technique?

One obvious approach is to create a separate serialized object for each
index value (a separate file for each), and only read that object when it
is needed. This isn't the only way, but it will get you started.

Another approach is to carefully design a class that encapsulated the entire
array/list of serializable objects, and serialize the entire class. This
may be much more difficult, and you may not be able to add or delete
objects without loading and saving the entire set. This shortcoming is not
present in the first approach.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top