01: package org.ofbiz.content.webapp.ftl;
02:
03: import java.io.*;
04: import freemarker.template.TransformControl;
05: import freemarker.template.TemplateModelException;
06: import org.ofbiz.base.util.Debug;
07:
08: public class LoopWriter extends Writer implements TransformControl {
09:
10: public LoopWriter(Writer out) {
11: }
12:
13: public int onStart() throws TemplateModelException, IOException {
14: return TransformControl.EVALUATE_BODY;
15: }
16:
17: public int afterBody() throws TemplateModelException, IOException {
18: return TransformControl.END_EVALUATION;
19: }
20:
21: public void onError(Throwable t) throws Throwable {
22: throw t;
23: }
24:
25: public void close() throws IOException {
26: }
27:
28: public void write(char cbuf[], int off, int len) {
29: }
30:
31: public void flush() throws IOException {
32: }
33:
34: }
|