public final class PropertyFileLoader extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
loadFromClasspathAsMap(String path,
boolean caseSensitive)
Loads the properties in the specified file.
|
static Map<String,String> |
loadFromClasspathAsMapIgnoringError(String path,
boolean caseSensitive)
Loads the properties in the specified file.
|
public static Map<String,String> loadFromClasspathAsMap(String path, boolean caseSensitive) throws IOException
Class.getResourceAsStream(String).
The keys of the returned map are not case sensitive.path - the path of the file (including name)caseSensitive - whether to create a map with case-sensitive keys or notIOException - when loading the file failedpublic static Map<String,String> loadFromClasspathAsMapIgnoringError(String path, boolean caseSensitive)
Class.getResourceAsStream(String).
The keys of the returned map are not case sensitive. If the file could not be read, an empty map
is returned.path - the path of the file (including name)caseSensitive - whether to create a map with case-sensitive keys or notCopyright © 2016 SAPERION AG. All rights reserved.