Serialize a java.awt.geom.Area

后端 未结 4 1260
时光说笑
时光说笑 2021-01-20 02:47

I have the need to serialize an Area object (java.awt.geom.Area) in a socket. However it doesn\'t seem to be serializable. Is there a way to do such thing? Maybe by converti

4条回答
  •  不知归路
    2021-01-20 03:13

    Use XStream to trivially convert it to/from XML. You don't need your object to implement particular interfaces, and the serialisation is customisable.

提交回复
热议问题