Serialization vs Embedded Database for simple standalone application

前端 未结 2 1868
轮回少年
轮回少年 2021-01-28 13:12

Say, I have a pretty simple Java application that needs the way to store some user settings. XML is not a really good solution, since I want to store them in binary form. So, wh

2条回答
  •  鱼传尺愫
    2021-01-28 14:00

    User settings are typically stored as

    • properties, using the properties file format
    • properties using the XML format
    • preferences, using the Preferences API. This has the advantage of storing and reading user and system preferences for you, without having to think about where to store them, etc. See http://download.oracle.com/javase/1.4.2/docs/guide/lang/preferences.html

提交回复
热议问题