public class DefaultPropertiesParser extends Object implements PropertiesParser
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENT_POUND |
static String |
COMMENT_SEMICOLON |
static String |
DEFAULT_CHARSET_NAME |
protected static char |
ESCAPE_TOKEN |
| Constructor and Description |
|---|
DefaultPropertiesParser() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
isContinued(String line) |
Map<String,String> |
parse(Resource resource)
Parses the specified
.properties resource and returns a map of the parsed properties or an
empty map if no properties were found. |
Map<String,String> |
parse(Scanner scanner)
Loads the .properties-formatted text backed by the given Scanner.
|
Map<String,String> |
parse(String source)
Parses the specified
.properties-formatted String and returns a map of the parsed properties or an
empty map if no properties were found. |
public static final String DEFAULT_CHARSET_NAME
public static final String COMMENT_POUND
public static final String COMMENT_SEMICOLON
protected static final char ESCAPE_TOKEN
public Map<String,String> parse(String source)
PropertiesParser.properties-formatted String and returns a map of the parsed properties or an
empty map if no properties were found.parse in interface PropertiesParsersource - the String to parsepublic Map<String,String> parse(Resource resource) throws IOException
PropertiesParser.properties resource and returns a map of the parsed properties or an
empty map if no properties were found.parse in interface PropertiesParserresource - the resource to parse.IOException - if unable to obtain the resource's inputStream.public Map<String,String> parse(Scanner scanner)
parse in interface PropertiesParserscanner - the Scanner from which to read the .properties-formatted textprotected static boolean isContinued(String line)
Copyright © 2017 Okta. All rights reserved.