Package com.okta.idx.sdk.api.config
Class DefaultPropertiesParser
- java.lang.Object
-
- com.okta.idx.sdk.api.config.DefaultPropertiesParser
-
- All Implemented Interfaces:
PropertiesParser
public class DefaultPropertiesParser extends java.lang.Object implements PropertiesParser
-
-
Constructor Summary
Constructors Constructor Description DefaultPropertiesParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static boolean
isContinued(java.lang.String line)
java.util.Map<java.lang.String,java.lang.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.java.util.Map<java.lang.String,java.lang.String>
parse(java.lang.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.java.util.Map<java.lang.String,java.lang.String>
parse(java.util.Scanner scanner)
Loads the .properties-formatted text backed by the given Scanner.
-
-
-
Method Detail
-
parse
public java.util.Map<java.lang.String,java.lang.String> parse(java.lang.String source)
Description copied from interface:PropertiesParser
Parses the specified.properties
-formatted String and returns a map of the parsed properties or an empty map if no properties were found.- Specified by:
parse
in interfacePropertiesParser
- Parameters:
source
- the String to parse- Returns:
- a map of the parsed properties or an empty map if no properties were found.
-
parse
public java.util.Map<java.lang.String,java.lang.String> parse(Resource resource) throws java.io.IOException
Description copied from interface:PropertiesParser
Parses the specified.properties
resource and returns a map of the parsed properties or an empty map if no properties were found.- Specified by:
parse
in interfacePropertiesParser
- Parameters:
resource
- the resource to parse.- Returns:
- a map of the parsed properties or an empty map if no properties were found.
- Throws:
java.io.IOException
- if unable to obtain the resource'sinputStream
.
-
parse
public java.util.Map<java.lang.String,java.lang.String> parse(java.util.Scanner scanner)
Loads the .properties-formatted text backed by the given Scanner. This implementation will close the scanner after it has finished loading.- Specified by:
parse
in interfacePropertiesParser
- Parameters:
scanner
- theScanner
from which to read the .properties-formatted text- Returns:
- a map of the parsed properties or an empty map if no properties were found.
-
isContinued
protected static boolean isContinued(java.lang.String line)
-
-