You may want to pause at this point, and consider whether this is REALLY what you want to do.
There are major limitations involved with using object serialization this way, that affect you both now and in the future, and you have to think VERY carefully about the implications of both. The object you serialize now can only be read by a system with the appropriate classes available. If you make changes to those classes, you have to take specific measures to maintain compatibility. This is a bit tricky, and can limit the nature and extent of your changes in the future. Further, you it will cost you time and effort to maintain this code, and to test and verify compatibility, with greater risk of failure to detect problems. Clearly, these problems are worse the longer your serialized objects will exist. Often, a better strategy is to define an XML format as your transport protocol. This doesn't completely negate all these issues, of course, but it does allow you to inspect what's going on, and to apply various standard tools (such as XSLT) for converting and upgrading objects. You can persist this XML, or you can in turn treat it as just a transport mechanism, and persist as relations in a database. Or you can map from XML to objects (and optionally, objects to relational database). ObjectOutputStream gives you an EXTREMELY tight and opaque coupling between the code on each side. It is usually to your advantage to use a looser coupling and more transparency. Especially in a client-server situation where you don't have control over when clients are upgraded. "A moment of convenience, a lifetime of regret!" On Apr 9, 10:00 pm, raqz <[email protected]> wrote: > Hi, > > I am trying to send a list from the android device to a webserver > which will receive the list and send it back to the android device. I > have written the below code and it runs fine if I just send values but > when I send an object, the app freezes. Could someone please help me > out in this. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

