While reading J2me Record Management System i found examples only on primitive data types and String Objects ..
For writing int we used writeInt(bytearray) method, For String Objects we used WriteUTF(bytearray) method
My question is:: I have developed one class called Animal , i want to know whether i can write Animal Object in to RMS using WriteUTF(bytearray) method... I mean can we use WriteUTF(bytearray) method to write any Objects in to RMS...
if it is not possible then how can i write Objects other than String into RMS.......I am not getting answer in books and website since all are concentrating on primitive types and String ... [ April 18, 2006: Message edited by: harish thrivile ]
Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T
You seem to refer to something like ObjectOutputStream in J2SE. BUT, i think there is no support for such a thing in J2ME.
The way around is, we can store the values of the members of the class and later retrieve them. Say if a class has 2 string and 1 int member, store these values in RMS and then when needed retrieve these values and assign them back to those members.
Agreed, that structures of classes are much more complex, but there is always a way around.