StringBuilder builder = new StringBuilder();
MoleculeTraverser traverser = new MoleculeTraverserImpl();
try {
ClosableIterator<Molecule> iterator = iterator();
try {
MoleculeHandler tmpHandler = new MoleculeToText(builder, localizer.getLocalizer());
while (iterator.hasNext()) {
Molecule molecule = iterator.next();
traverser.traverse(molecule, tmpHandler);
}
return builder.toString();