code: @Override
    public Properties getProperties(InputStream inputStream) {
      requireNonNull(inputStream);
  
      Yaml yaml = new Yaml();
  
      Properties properties = new Properties();
  
      try (Reader reader = new UnicodeReader(inputStream)) {
  
        Object object = yaml.load(reader);
  
        if (object != null) {
          Map<String, Object> yamlAsMap = convertToMap(object);
          properties.putAll(flatten(yamlAsMap));
        }
  
        return properties;
  
      } catch (IOException | ScannerException e) {
        throw new IllegalStateException("Unable to load yaml configuration from provided stream", e);
      }
    }
docs: Get {@link Properties} for a given {@code inputStream} treating it as a YAML file.
  
  @param inputStream input stream representing YAML file
  @return properties representing values from {@code inputStream}
  @throws IllegalStateException when unable to read properties