How to write Object as human readable text file

后端 未结 5 1969
无人及你
无人及你 2020-12-21 08:35

I want to write objects in human readable form in a text file, the file gets saved as a normal serialized object with unwanted characters instead.

How do I rewrite t

5条回答
  •  Happy的楠姐
    2020-12-21 09:07

    You can serialize / desirialize your class instances as XML with JAXB or JavaBeans. In both cases you need to prepare your class - to use annotations or setters / getters.

提交回复
热议问题