Java 类org.yaml.snakeyaml.serializer.Serializer 实例源码

项目:AndroidApktool    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:AndroidApktool    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:5zig-TIMV-Plugin    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:snake-yaml    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:snake-yaml    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:SubServers-2    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:SubServers-2    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:FastAsyncWorldedit    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:FastAsyncWorldedit    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:snakeyaml    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
}
项目:snakeyaml    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null);
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:TestTheTeacher    文件:Yaml.java   
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver,
            dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (java.io.IOException e) {
        throw new YAMLException(e);
    }
}
项目:TestTheTeacher    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(Node data) {
    SilentEmitter emitter = new SilentEmitter();
    @SuppressWarnings("deprecation")
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions,
            dumperOptions.getExplicitRoot());
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (java.io.IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}
项目:org.openntf.domino    文件:Yaml.java   
private void dumpAll(final Iterator<? extends Object> data, final Writer output, final Tag rootTag) {
    Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver, dumperOptions, rootTag);
    try {
        serializer.open();
        while (data.hasNext()) {
            Node node = representer.represent(data.next());
            serializer.serialize(node);
        }
        serializer.close();
    } catch (java.io.IOException e) {
        throw new YAMLException(e);
    }
}
项目:org.openntf.domino    文件:Yaml.java   
/**
 * Serialize the representation tree into Events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param data
 *            representation tree
 * @return Event list
 */
public List<Event> serialize(final Node data) {
    SilentEmitter emitter = new SilentEmitter();
    @SuppressWarnings("deprecation")
    Serializer serializer = new Serializer(emitter, resolver, dumperOptions, dumperOptions.getExplicitRoot());
    try {
        serializer.open();
        serializer.serialize(data);
        serializer.close();
    } catch (java.io.IOException e) {
        throw new YAMLException(e);
    }
    return emitter.getEvents();
}