开发者

Java Properties Class appending date

开发者 https://www.devze.com 2023-03-08 22:13 出处:网络
I am using the java properties class to append a value to my config file with this code.(I stripped out error handling and whatnot)

I am using the java properties class to append a value to my config file with this code.(I stripped out error handling and whatnot)

Properties configFile = new Properties();
configFile.setProperty(key, value);
configFile.store(new FileOutputStream("plugins/WirelessRedstone/receivers.properties", true), null);

When I append a key value pair, the current date and time is added before my pair. example #Thu May 26 03:39:59 EDT 2011.

How can I make this stop?

Thanks a bunch, gioda开发者_StackOverflowmelio


As per Java Docs of store method in Properties..it always writes that line

Next, a comment line is always written, consisting of an ASCII # character, the current date and time (as if produced by the toString method of Date for the current time), and a line separator as generated by the Writer.

you can write your own store method for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消