gpt4 book ai didi

org.yaml.snakeyaml.Yaml.loadFromReader()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 03:58:40 27 4
gpt4 key购买 nike

本文整理了Java中org.yaml.snakeyaml.Yaml.loadFromReader()方法的一些代码示例,展示了Yaml.loadFromReader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yaml.loadFromReader()方法的具体详情如下:
包路径:org.yaml.snakeyaml.Yaml
类名称:Yaml
方法名:loadFromReader

Yaml.loadFromReader介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 *
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(String yaml) {
  return (T) loadFromReader(new StreamReader(yaml), Object.class);
}

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param io
 *            data to load from (BOM must not be present)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(Reader io) {
  return (T) loadFromReader(new StreamReader(io), Object.class);
}

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param <T>
 *            Class is defined by the second argument
 * @param io
 *            data to load from (BOM must not be present)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(Reader io, Class<T> type) {
  return (T) loadFromReader(new StreamReader(io), type);
}

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 *
 * @param <T>
 *            Class is defined by the second argument
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(String yaml, Class<T> type) {
  return (T) loadFromReader(new StreamReader(yaml), type);
}

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param io
 *            data to load from (BOM is respected to detect encoding and removed from the data)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(InputStream io) {
  return (T) loadFromReader(new StreamReader(new UnicodeReader(io)), Object.class);
}

代码示例来源:origin: redisson/redisson

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param <T>
 *            Class is defined by the second argument
 * @param input
 *            data to load from (BOM is respected to detect encoding and removed from the data)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(InputStream input, Class<T> type) {
  return (T) loadFromReader(new StreamReader(new UnicodeReader(input)), type);
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param io
 *            data to load from (BOM must not be present)
 * @return parsed object
 */
public Object load(Reader io) {
  return loadFromReader(new StreamReader(io), Object.class);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 *
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(String yaml) {
  return (T) loadFromReader(new StreamReader(yaml), Object.class);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param io
 *            data to load from (BOM must not be present)
 * @return parsed object
 */
public Object load(Reader io) {
  return loadFromReader(new StreamReader(io), Object.class);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 * 
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @return parsed object
 */
public Object load(String yaml) {
  return loadFromReader(new StreamReader(yaml), Object.class);
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 * 
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @return parsed object
 */
public Object load(String yaml) {
  return loadFromReader(new StreamReader(yaml), Object.class);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param io
 *            data to load from (BOM must not be present)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(Reader io) {
  return (T) loadFromReader(new StreamReader(io), Object.class);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 *
 * @param <T>
 *            Class is defined by the second argument
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(String yaml, Class<T> type) {
  return (T) loadFromReader(new StreamReader(yaml), type);
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param <T>
 *            Class is defined by the second argument
 * @param io
 *            data to load from (BOM must not be present)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(Reader io, Class<T> type) {
  return (T) loadFromReader(new StreamReader(io), type);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Parse the only YAML document in a String and produce the corresponding
 * Java object. (Because the encoding in known BOM is not respected.)
 * 
 * @param <T>
 *            Class is defined by the second argument
 * @param yaml
 *            YAML data to load from (BOM must not be present)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(String yaml, Class<T> type) {
  return (T) loadFromReader(new StreamReader(yaml), type);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param io
 *            data to load from (BOM is respected and removed)
 * @return parsed object
 */
public Object load(InputStream io) {
  return loadFromReader(new StreamReader(new UnicodeReader(io)), Object.class);
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param io
 *            data to load from (BOM is respected and removed)
 * @return parsed object
 */
public Object load(InputStream io) {
  return loadFromReader(new StreamReader(new UnicodeReader(io)), Object.class);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param io
 *            data to load from (BOM is respected and removed)
 * @param <T>
 *           the class of the instance to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T load(InputStream io) {
  return (T) loadFromReader(new StreamReader(new UnicodeReader(io)), Object.class);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 *
 * @param <T>
 *            Class is defined by the second argument
 * @param input
 *            data to load from (BOM is respected and removed)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(InputStream input, Class<T> type) {
  return (T) loadFromReader(new StreamReader(new UnicodeReader(input)), type);
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

/**
 * Parse the only YAML document in a stream and produce the corresponding
 * Java object.
 * 
 * @param <T>
 *            Class is defined by the second argument
 * @param input
 *            data to load from (BOM is respected and removed)
 * @param type
 *            Class of the object to be created
 * @return parsed object
 */
@SuppressWarnings("unchecked")
public <T> T loadAs(InputStream input, Class<T> type) {
  return (T) loadFromReader(new StreamReader(new UnicodeReader(input)), type);
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com