Class ConfigDocumentFactory

    • Method Detail

      • parseReader

        public static parseReader​(java.io.Reader reader,
                                                 ConfigParseOptions options)
        Parses a Reader into a ConfigDocument instance.
        Parameters:
        reader - the reader to parse
        options - parse options to control how the reader is interpreted
        Returns:
        the parsed configuration
        Throws:
        ConfigException - on IO or parse errors
      • parseFile

        public static parseFile​(java.io.File file,
                                               ConfigParseOptions options)
        Parses a file into a ConfigDocument instance.
        Parameters:
        file - the file to parse
        options - parse options to control how the file is interpreted
        Returns:
        the parsed configuration
        Throws:
        ConfigException - on IO or parse errors
      • parseFile

        public static parseFile​(java.io.File file)
        Parses a file into a ConfigDocument instance as with parseFile(File,ConfigParseOptions) but always uses the default parse options.
        Parameters:
        file - the file to parse
        Returns:
        the parsed configuration
        Throws:
        ConfigException - on IO or parse errors
      • parseString

        public static parseString​(java.lang.String s,
                                                 ConfigParseOptions options)
        Parses a string which should be valid HOCON or JSON.
        Parameters:
        s - string to parse
        options - parse options
        Returns:
        the parsed configuration
      • parseString

        public static parseString​(java.lang.String s)
        Parses a string (which should be valid HOCON or JSON). Uses the default parse options.
        Parameters:
        s - string to parse
        Returns:
        the parsed configuration