gpt4 book ai didi

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

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

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

Yaml.dumpAll介绍

[英]Serialize a sequence of Java objects into a YAML String.
[中]将Java对象序列序列化为YAML字符串。

代码示例

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

/**
 * Serialize a sequence of Java objects into a YAML stream.
 *
 * @param data
 *            Iterator with Objects
 * @param output
 *            stream to write to
 */
public void dumpAll(Iterator<? extends Object> data, Writer output) {
  dumpAll(data, output, null);
}

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

/**
 * Serialize a Java object into a YAML String.
 *
 * @param data
 *            Java object to be Serialized to YAML
 * @return YAML String
 */
public String dump(Object data) {
  List<Object> list = new ArrayList<Object>(1);
  list.add(data);
  return dumpAll(list.iterator());
}

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

/**
 * Serialize a sequence of Java objects into a YAML String.
 *
 * @param data
 *            Iterator with Objects
 * @return YAML String with all the objects in proper sequence
 */
public String dumpAll(Iterator<? extends Object> data) {
  StringWriter buffer = new StringWriter();
  dumpAll(data, buffer, null);
  return buffer.toString();
}

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

/**
 * Serialize a Java object into a YAML stream.
 *
 * @param data
 *            Java object to be serialized to YAML
 * @param output
 *            stream to write to
 */
public void dump(Object data, Writer output) {
  List<Object> list = new ArrayList<Object>(1);
  list.add(data);
  dumpAll(list.iterator(), output, null);
}

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

list.add(data);
StringWriter buffer = new StringWriter();
dumpAll(list.iterator(), buffer, rootTag);
representer.setDefaultFlowStyle(oldStyle);
return buffer.toString();

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

/**
   * Encode the passed {@link StyledLayerDescriptor} as YSLD.
   *
   * @param sld
   * @throws IOException
   */
  public void encode(StyledLayerDescriptor sld) throws IOException {
    DumperOptions dumpOpts = new DumperOptions();
    dumpOpts.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);

    Yaml yaml = YamlUtil.getSafeYaml(new YsldRepresenter(uomMapper), dumpOpts);
    yaml.dumpAll(new RootEncoder(sld), out);
  }
}

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

/**
 * Serialize a sequence of Java objects into a YAML stream.
 * 
 * @param data
 *            Iterator with Objects
 * @param output
 *            stream to write to
 */
public void dumpAll(Iterator<? extends Object> data, Writer output) {
  dumpAll(data, output, null);
}

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

/**
 * Serialize a sequence of Java objects into a YAML stream.
 *
 * @param data
 *            Iterator with Objects
 * @param output
 *            stream to write to
 */
public void dumpAll(Iterator<? extends Object> data, Writer output) {
  dumpAll(data, output, null);
}

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

/**
 * Serialize a sequence of Java objects into a YAML stream.
 * 
 * @param data
 *            Iterator with Objects
 * @param output
 *            stream to write to
 */
public void dumpAll(Iterator<? extends Object> data, Writer output) {
  dumpAll(data, output, null);
}

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

/**
 * Serialize a sequence of Java objects into a YAML String.
 * 
 * @param data
 *            Iterator with Objects
 * @return YAML String with all the objects in proper sequence
 */
public String dumpAll(Iterator<? extends Object> data) {
  StringWriter buffer = new StringWriter();
  dumpAll(data, buffer, null);
  return buffer.toString();
}

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

/**
 * Serialize a sequence of Java objects into a YAML String.
 *
 * @param data
 *            Iterator with Objects
 * @return YAML String with all the objects in proper sequence
 */
public String dumpAll(Iterator<? extends Object> data) {
  StringWriter buffer = new StringWriter();
  dumpAll(data, buffer, null);
  return buffer.toString();
}

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

/**
 * Serialize a sequence of Java objects into a YAML String.
 * 
 * @param data
 *            Iterator with Objects
 * @return YAML String with all the objects in proper sequence
 */
public String dumpAll(Iterator<? extends Object> data) {
  StringWriter buffer = new StringWriter();
  dumpAll(data, buffer, null);
  return buffer.toString();
}

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

/**
 * Serialize a Java object into a YAML String.
 * 
 * @param data
 *            Java object to be Serialized to YAML
 * @return YAML String
 */
public String dump(Object data) {
  List<Object> list = new ArrayList<Object>(1);
  list.add(data);
  return dumpAll(list.iterator());
}

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

/**
 * Serialize a Java object into a YAML stream.
 * 
 * @param data
 *            Java object to be serialized to YAML
 * @param output
 *            stream to write to
 */
public void dump(Object data, Writer output) {
  List<Object> list = new ArrayList<Object>(1);
  list.add(data);
  dumpAll(list.iterator(), output, null);
}

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

/**
 * Serialize a Java object into a YAML String.
 *
 * @param data
 *            Java object to be Serialized to YAML
 * @return YAML String
 */
public String dump(Object data) {
  List<Object> list = new ArrayList<Object>(1);
  list.add(data);
  return dumpAll(list.iterator());
}

代码示例来源:origin: kubernetes-client/java

/**
 * Takes an Iterator of YAML API objects and returns a YAML string representing all of them
 *
 * @param data The list of YAML API objects
 * @return A String representing the list of YAML API objects.
 */
public static String dumpAll(Iterator<? extends Object> data) {
 return getSnakeYaml().dumpAll(data);
}

代码示例来源:origin: kubernetes-client/java

/**
 * Takes an Iterator of YAML API objects and writes a YAML String representing all of them.
 *
 * @param data The list of YAML API objects.
 * @param output The writer to output the YAML String to.
 */
public static void dumpAll(Iterator<? extends Object> data, Writer output) {
 getSnakeYaml().dumpAll(data, output);
}

代码示例来源:origin: io.kubernetes/client-java

/**
 * Takes an Iterator of YAML API objects and returns a YAML string representing all of them
 *
 * @param data The list of YAML API objects
 * @return A String representing the list of YAML API objects.
 */
public static String dumpAll(Iterator<? extends Object> data) {
 return getSnakeYaml().dumpAll(data);
}

代码示例来源:origin: io.kubernetes/client-java

/**
 * Takes an Iterator of YAML API objects and writes a YAML String representing all of them.
 *
 * @param data The list of YAML API objects.
 * @param output The writer to output the YAML String to.
 */
public static void dumpAll(Iterator<? extends Object> data, Writer output) {
 getSnakeYaml().dumpAll(data, output);
}

代码示例来源:origin: org.geotools/gt-ysld

/**
   * Encode the passed {@link StyledLayerDescriptor} as YSLD.
   *
   * @param sld
   * @throws IOException
   */
  public void encode(StyledLayerDescriptor sld) throws IOException {
    DumperOptions dumpOpts = new DumperOptions();
    dumpOpts.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);

    Yaml yaml = YamlUtil.getSafeYaml(new YsldRepresenter(uomMapper), dumpOpts);
    yaml.dumpAll(new RootEncoder(sld), out);
  }
}

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