K
Kevin Kirkeby
Any ideas why when I store a property with colons in them, they are
written as '\:' instead of ':' on Windows 2000?
Here is an example of code. When this is run, you'll see that
C:\temp\test.properties has a property set as follows:
testProp=front\:middle\:back
It should be, instead: testProp=front:middle:back
Why am I getting the extra '\'s? Is there some sort of special
character I should put before the colons?
Here is sample code:
Properties properties = new Properties();
FileInputStream fis;
fis = new FileInputStream("C:\\temp\\test.properties");
try {
properties.load(fis);
} finally {
fis.close();
}
properties.setProperty("testProp", "front:middle:back");
FileOutputStream fos = new
FileOutputStream("C:\\temp\\test.properties");
properties.store(fos,"");
fos.close();
written as '\:' instead of ':' on Windows 2000?
Here is an example of code. When this is run, you'll see that
C:\temp\test.properties has a property set as follows:
testProp=front\:middle\:back
It should be, instead: testProp=front:middle:back
Why am I getting the extra '\'s? Is there some sort of special
character I should put before the colons?
Here is sample code:
Properties properties = new Properties();
FileInputStream fis;
fis = new FileInputStream("C:\\temp\\test.properties");
try {
properties.load(fis);
} finally {
fis.close();
}
properties.setProperty("testProp", "front:middle:back");
FileOutputStream fos = new
FileOutputStream("C:\\temp\\test.properties");
properties.store(fos,"");
fos.close();