开发者

serialization in android with a client server architecture

开发者 https://www.devze.com 2023-03-01 02:15 出处:网络
I\'m implementing a server using netbeans, as it is the IDE I feel most comfortable with. However the server accepts multiple android clients ( for the android part I\'m using Motodev by Eclipse).

I'm implementing a server using netbeans, as it is the IDE I feel most comfortable with. However the server accepts multiple android clients ( for the android part I'm using Motodev by Eclipse).

I ha开发者_运维技巧ve the same class (which is being serialized) on both client and server. Is it possible to serialize objects from the client side to be recognized by the server and vice-versa? I'm using Object streams and when I tried to cast the object received from the stream, an exception (incompatible types) occurred. Is there a way to prevent this since it is the exact class?


I like to use XStream.

http://x-stream.github.io (XStream is a simple library to serialize objects to XML and back again.) http://jars.de/java/android-xml-serialization-with-xstream

0

精彩评论

暂无评论...
验证码 换一张
取 消