public class Property extends Object
| 构造器和说明 |
|---|
Property() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Map<String,String> |
getMap(String propPath)
从一个properties文件中获取一个Map集合
|
static boolean |
mapToProp(Map<String,String> map,
String propPath,
String comments)
将一个Map的数据持久化到properties文件内,Map内容请使用UTF-8编码方式
|
static boolean |
mapUpdateToProp(Map<String,String> map,
String propPath,
String comments)
将一个Map的数据添加到一个properties文件内,Map内容请使用UTF-8编码方式
|
public static Map<String,String> getMap(String propPath) throws IOException
propPath - 需要读取的properties文件IOException - IO异常public static boolean mapToProp(Map<String,String> map, String propPath, String comments) throws IOException
map - 要存放的MappropPath - properties文件路径comments - 注释IOException - IO异常public static boolean mapUpdateToProp(Map<String,String> map, String propPath, String comments) throws IOException
map - 要添加的MappropPath - properties文件路径comments - 注释IOException - IO异常Copyright © 2018. All Rights Reserved.