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

        final LoaderOptions options = new LoaderOptions();
        final Constructor constructor = new Constructor(Settings.class, options);
        final TypeDescription settingsDescription = new TypeDescription(Settings.class);
        settingsDescription.addPropertyParameters("hosts", String.class);
        settingsDescription.addPropertyParameters("serializer", SerializerSettings.class);
        constructor.addTypeDescription(settingsDescription);

        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
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java