I have this function to save in a file my properties:
void saveProperties(Properties properties) {
File file = new File("C:\\Files\\new.properties");
FileOutputStream fileOutputStream = new FileOutputStream(file);
properties.store(fileOutputStream, "Properties");
}
My problem is that when I want to save in a file the properties below using my function:
myPropertieTest1=Hi : friend
myPropertieTest2=#Bye
myPropertieTest3=!#:
My code added an escape character like this:
myPropertieTest=Hi \: friend
myPropertieTest2=\#Bye
myPropertieTest3=\!\#\:
How can I fix this? I need to save the properties as the originals (without the escape characters)