Java 读写 Properties 文件

2015-02-26 0 747
Java 读写 Properties 文件
 
//读操作
Properties properties = new Properties(); 
try
{ 
    properties.load(new FileInputStream("filename.properties")); 
} 
catch (IOException e) 
{ 
    // implement catch logic
}

//写操作
Properties properties = new Properties();
try
{
    properties.store(
        new FileOutputStream("filename.properties"), null);
} 
catch (IOException e) 
{
    // implement catch logic
}

遇见资源网 java Java 读写 Properties 文件 http://www.ox520.com/8583.html

下一篇: JDBC的工具类
常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务