public static Settings read(final InputStream stream) {
        Objects.requireNonNull(stream);

        final Constructor constructor = createDefaultYamlConstructor();
        final Yaml yaml = new Yaml(constructor);
        return yaml.loadAs(stream, Settings.class);
    }
Read configuration from a file into a new {@link Settings} object.

@param stream an input stream containing a Gremlin Server YAML configuration
@return a new {@link Optional} object wrapping the created {@link Settings}
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java