开发者

Serializing Font Object from C# and Deserializing on Java

开发者 https://www.devze.com 2023-04-10 11:35 出处:网络
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?

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.

0

精彩评论

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

关注公众号