Saving to properties file escapes :

前端 未结 2 1375
挽巷
挽巷 2020-12-11 02:16

Does anyone know why the colons are getting escaped when I store the properties file?

I\'m doing this:

Properties prop = new Properties();


// Set t         


        
2条回答
  •  囚心锁ツ
    2020-12-11 02:52

    In properties files, both of these are legit:

    key1 = value
    key2: value
    

    So both = and : must be escaped.

    Now, if you read the thing back with Properties, it's no problem. Otherwise, you'll have to write custom code

提交回复
热议问题