public void dumpAll(Iterator<? extends Object> data, Writer output) {
dumpAll(data, output, dumperOptions.getExplicitRoot());
}
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);
}
}