Class Yaml

java.lang.Object
com.gophers.utilities.Yaml

public class Yaml extends Object
Utility class for parsing a simple YAML structure from an input stream. Parses YAML data where keys represent sections with integer values as entries.
  • Constructor Details

    • Yaml

      public Yaml()
      Default constructor for Yaml class. Initializes a new instance of the Yaml utility.
  • Method Details

    • loadAs

      public Map<String,Map<String,Integer>> loadAs(InputStream inputStream) throws IOException
      Loads and parses YAML data from an input stream into a nested map structure.
      Parameters:
      inputStream - InputStream containing YAML-formatted data.
      Returns:
      A map where each key represents a section containing a map of key-value pairs.
      Throws:
      IOException - If an I/O error occurs while reading the input stream.