Is this possible? If so how? Or failing that how can I store more than one field into 1 record? Thanks Pat
posted 15 years ago
You can't store objects as such, but you can store primitive Java types (int, long, char, etc), by using java.io.DataInputStream and java.io.DataOutputStream. If you want to sotre more than 1 field in a record, then you will have to write your own encode and decode routines. A shame, but that's the way it goes. If you look at my book, you'll see a Record class, which is comprised of n Fields. It might be what you want (although, for the simplicity of the chapter I do assume all Fields are Strings...) ------------------ Richard Taylor Author of Professional Java Mobile Programming
Richard Taylor <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861003897/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Mobile Programming</a>
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads