public class PropertiesUtil extends Object
| Constructor and Description |
|---|
PropertiesUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
get(String properties,
String key)
读取资源文件键值
|
static Map<String,String> |
getMap(String properties)
读取资源文件所有信息
|
void |
setValue(String properties,
String key,
String value)
设置属性值
|
public static String get(String properties, String key) throws IOException
properties - 属性文件包路径 如:net/mingsoft/resources/a.propertieskey - 键IOExceptionpublic static Map<String,String> getMap(String properties) throws FileNotFoundException, IOException
properties - 属性文件包路径 如:net/mingsoft/resources/a.propertiesFileNotFoundExceptionIOExceptionpublic void setValue(String properties, String key, String value) throws IOException
properties - 属性文件包路径 如:net/mingsoft/resources/a.propertieskey - 键value - 值IOExceptionCopyright © 2021. All rights reserved.