I am playing around with Android Sockets and I currently I am trying to send a file via WiFi. I have a simple protocol that uses few notification classes. Everything works OK on Java client and Java server, but I want to do the same thing with C# (or C++) server/client and Java client/server. I need to decide how to serialize my notification data.
I was thinking about XML format. It would contain a notification ID, client ID and some data (i.ex. chunk of a file).
How can I save a chunk of a file (or any byte array) into a XML file (or text based file)?
Maybe I am thinking completely wrong way?
Run your data through a Base64 encoder and then stick that data into a CDATA section in your xml file. Apache makes a Base64 library for Java. I’m sure it wouldn’t be too hard to find one for C#/C++.