public class Props extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Properties |
load(InputStream inputStream) |
Properties |
load(Reader reader) |
Properties |
load(Resource resource) |
Properties |
loadFromClasspath(String classpath) |
Properties |
loadFromFile(File file) |
Properties |
loadFromFile(String location) |
Properties |
loadFromString(String string) |
Properties |
loadFromURL(String url) |
Properties |
loadFromURL(URL url) |
Properties |
loadFromXML(InputStream inputStream) |
Properties |
loadFromXML(Resource resource) |
static Map<String,String> |
toStringMap(Properties properties) |
static Map<String,String> |
toStringMap(Properties properties,
boolean sort) |
static Map<String,String> |
toStringMap(Properties properties,
Comparator<String> keyComparator) |
public Properties loadFromFile(File file) throws IOException
IOExceptionpublic Properties loadFromFile(String location) throws IOException
IOExceptionpublic Properties loadFromClasspath(String classpath) throws IOException
IOExceptionpublic Properties loadFromURL(String url) throws IOException
IOExceptionpublic Properties loadFromURL(URL url) throws IOException
IOExceptionpublic Properties loadFromString(String string) throws IOException
IOExceptionpublic Properties load(Resource resource) throws IOException
IOExceptionpublic Properties load(Reader reader) throws IOException
IOExceptionpublic Properties load(InputStream inputStream) throws IOException
IOExceptionpublic Properties loadFromXML(Resource resource) throws IOException
IOExceptionpublic Properties loadFromXML(InputStream inputStream) throws IOException
IOExceptionpublic static Map<String,String> toStringMap(@Nullable Properties properties)
public static Map<String,String> toStringMap(@Nullable Properties properties, boolean sort)
public static Map<String,String> toStringMap(@Nullable Properties properties, @Nullable Comparator<String> keyComparator)
Copyright © 2020. All rights reserved.