Serializing Font Object from C# and Deserializing on Java
Using @Elad solution at this answer I could serialize and de-serialize a Font using C# but I need to de-serialize it in Java. Is there a way to achieve it?
If someone has any good article on doing this for any other开发者_高级运维 object it could be helpful.
In Elad's answer, the System.Drawing.Font is converted to XML, and then to a pure binary form. On the Java, side, it's pretty trivial to deserialize from binary to XML, but from there, you will have to know what you plan on doing with the XML. Do you have a java class you are wanting/needing to use?
You can try Protocol Buffers.
Its serialized form is language neutral and you can use it on serialize on C# and deserialize on java side.
精彩评论