public class DefaultPropertiesParser extends Object implements PropertiesParser
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 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 PropertiesParser
source
- 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 PropertiesParser
resource
- the resource to parse.IOException
- if unable to obtain the resource's inputStream
.public Map<String,String> parse(Scanner scanner)
parse
in interface PropertiesParser
scanner
- the Scanner
from which to read the .properties-formatted textprotected static boolean isContinued(String line)
Copyright © 2017–2023 Okta. All rights reserved.