code: public static <T> T loadFromXMLStream(Class<T> configClass, InputStream inputStream) throws Exception {
          Persister persister = new Persister();
          return persister.read(configClass, inputStream);
      }
docs: Loads config values from {@link InputStream}, which is supposed to be XML stream,
  maps them to configuration class fields and returns the result instance.
  
  @param configClass Class, which fields will be mapped to config values.
  @param inputStream Where to load the config from.
  @param <T>         Generic type of configClass
  @return Instance of configClass with field values loaded from config file.
  @throws Exception