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
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
That's what the store() API does:-
Each character of the key and element strings is examined to see whether it should be rendered as an escape sequence. The ASCII characters \, tab, form feed, newline, and carriage return are written as \, \t, \f \n, and \r, respectively. Characters less than \u0020 and characters greater than \u007E are written as \uxxxx for the appropriate hexadecimal value xxxx. For the key, all space characters are written with a preceding \ character. For the element, leading space characters, but not embedded or trailing space characters, are written with a preceding \ character. The key and element characters #, !, =, and : are written with a preceding backslash to ensure that they are properly loaded.
It shouldn't really matter to you as long as you use Properties
to get the values.