I'm trying to add hexadecimal value in a property file, the value is getting stored but i can see a "\" getting appended, which I don't want,
test.properties
#
#Fri Jun 07 21:18:49 GMT+05:30 2013
test=fe\:fe
the Java file
public class PropertySave {
private static File s_file;
private static Properties s_properties = new Properties();
public static void main(String[] args) {
loadProperties();
s_properties.setProperty("test", "fe:fe");
saveProperties();
}
private static void saveProperties() {
FileOutputStream fout = null;
try {
fout = new FileOutputStream(s_file);
s_properties.store(fout, "");
} catch (IOException ioe) {
ioe.printStackTrace();
System.exit(1);
} finally {
if (fout != null) {
try {
fout.close();
} catch (final IOException ioe2) {
ioe2.printStackTrace();
System.exit(1);
}
}
}
}
private static void loadProperties() {
s_file = new File("test.properties");
if ((!s_file.exists()) || (!s_file.isFile())) {
System.exit(1);
}
FileInputStream fin = null;
try {
fin = new FileInputStream(s_file);
s_properties.load(fin);
} catch (IOException ioe) {
ioe.printStackTrace();
System.exit(1);
} finally {
if (fin != null) {
try {
fin.close();
} catch (final IOException ioe2) {
ioe2.printStackTrace();
System.exit(1);
}
}
}
}
}
In java file the s_properties.setProperty("test", "fe:fe"); the output in property file is different(test.properties) fe:fe this i want to ignore as this property file is input to other system in "C" Language because of which my things are not working,
What Should I do to make sure the input in java file and output in properties file will same