1 package org.ofbiz.webapp.ftl; 2 3 import java.io.IOException ; 4 import java.io.Writer ; 5 6 import freemarker.template.TemplateModelException; 7 import freemarker.template.TransformControl; 8 9 public class LoopWriter extends Writer implements TransformControl { 10 11 public LoopWriter(Writer out) { 12 } 13 14 public int onStart() throws TemplateModelException, IOException { 15 return TransformControl.EVALUATE_BODY; 16 } 17 18 public int afterBody() throws TemplateModelException, IOException { 19 return TransformControl.END_EVALUATION; 20 } 21 22 public void onError(Throwable t) throws Throwable { 23 throw t; 24 } 25 26 public void close() throws IOException { 27 } 28 29 public void write(char cbuf[], int off, int len) { 30 } 31 32 public void flush() throws IOException { 33 } 34 35 } 36 | Popular Tags |