Class DefaultPropertiesParser

java.lang.Object
com.okta.sdk.impl.config.DefaultPropertiesParser
All Implemented Interfaces:
PropertiesParser

public class DefaultPropertiesParser extends Object implements PropertiesParser
  • Constructor Details

    • DefaultPropertiesParser

      public DefaultPropertiesParser()
  • Method Details

    • parse

      public Map<String,String> parse(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 interface PropertiesParser
      Parameters:
      source - the String to parse
      Returns:
      a map of the parsed properties or an empty map if no properties were found.
    • parse

      public Map<String,String> parse(Resource resource) throws 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 interface PropertiesParser
      Parameters:
      resource - the resource to parse.
      Returns:
      a map of the parsed properties or an empty map if no properties were found.
      Throws:
      IOException - if unable to obtain the resource's inputStream.
    • parse

      public Map<String,String> parse(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 interface PropertiesParser
      Parameters:
      scanner - the Scanner 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(String line)