Java 属性类附加日期
我正在使用 java 属性类通过此代码将值附加到我的配置文件。(我删除了错误处理等)
Properties configFile = new Properties();
configFile.setProperty(key, value);
configFile.store(new FileOutputStream("plugins/WirelessRedstone/receivers.properties", true), null);
当我附加键值对时,当前日期和时间会添加到我的键值对之前。示例#Thu May 26 03:39:59 EDT 2011
。
我怎样才能阻止这一切?
非常感谢,乔达梅里奥
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, giodamelio
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据属性中存储方法的 Java 文档..它总是写该行
您可以为此编写自己的存储方法。
As per Java Docs of store method in Properties..it always writes that line
you can write your own store method for this.