Package net.sourceforge.yamlbeans

Examples of net.sourceforge.yamlbeans.YamlWriter


    StringWriter stringWriter = new StringWriter();
    YamlConfig yamlConfig = new YamlConfig();
    yamlConfig.writeConfig.setIndentSize(2);
    yamlConfig.writeConfig.setWriteRootTags(false);

    YamlWriter writer = new YamlWriter(stringWriter, yamlConfig);
    try {
      writer.write(collection);
      writer.close();
    } catch (YamlException e) {
      throw new AppEngineConfigException("Unable to generate YAML.", e);
    }

    for (String line : stringWriter.toString().split("\n")) {
View Full Code Here


    yamlConfig.writeConfig.setIndentSize(2);
    yamlConfig.writeConfig.setWriteRootTags(false);
    yamlConfig.writeConfig.setWriteRootElementTags(false);
    yamlConfig.writeConfig.setWriteDefaultValues(true);
    yamlConfig.setPropertyElementType(ClientDeploy.class, "requests", Request.class);
    YamlWriter yamlWriter = new YamlWriter(stringWriter, yamlConfig);
    ClientDeploy clientDeploy = new ClientDeploy(runtime, startTimeUsec, endTimeUsec, requests,
        success, sdkVersion);

    yamlWriter.write(clientDeploy);
    yamlWriter.close();
    return stringWriter.toString();
  }
View Full Code Here

  }

  public String serialize(Object bean) {
    StringWriter writer = new StringWriter();
    try {
      YamlWriter yamlWriter = new YamlWriter(writer);
      try {
        yamlWriter.write(bean);
      } catch (YamlException e1) {
      } finally {
        try {
          yamlWriter.close();
        } catch (YamlException e) {
        }
      }
      writer.flush();
    } finally {
View Full Code Here

  }

  public String serialize(Object bean) {
    StringWriter writer = new StringWriter();
    try {
      YamlWriter yamlWriter = new YamlWriter(writer);
      try {
        yamlWriter.write(bean);
      } catch (YamlException e1) {
      } finally {
        try {
          yamlWriter.close();
        } catch (YamlException e) {
        }
      }
      writer.flush();
    } finally {
View Full Code Here

TOP

Related Classes of net.sourceforge.yamlbeans.YamlWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.