1 28 29 package com.caucho.jsp; 30 31 import com.caucho.log.Log; 32 import com.caucho.vfs.FlushBuffer; 33 34 import javax.servlet.jsp.JspWriter ; 35 import javax.servlet.jsp.tagext.BodyContent ; 36 import java.io.IOException ; 37 import java.io.Reader ; 38 import java.io.Writer ; 39 import java.util.logging.Logger ; 40 41 44 abstract class AbstractJspWriter extends BodyContent implements FlushBuffer { 45 protected static final Logger log = Log.open(AbstractJspWriter.class); 46 private JspWriter _parent; 47 48 private Writer _writer; 50 51 54 AbstractJspWriter() 55 { 56 super(null); 57 58 this.autoFlush = true; 59 } 60 61 64 AbstractJspWriter(int bufferSize, boolean isAutoFlush) 65 { 66 super(null); 67 68 this.bufferSize = bufferSize; 69 this.autoFlush = isAutoFlush; 70 } 71 72 75 public void setParent(JspWriter parent) 76 { 77 _parent = parent; 78 } 79 80 83 public final JspWriter getEnclosingWriter() 84 { 85 return _parent; 86 } 87 88 public void writeOut(Writer writer) throws IOException 89 { 90 throw new UnsupportedOperationException (); 91 } 92 93 public String getString() 94 { 95 throw new UnsupportedOperationException (); 96 } 97 98 public Reader getReader() 99 { 100 throw new UnsupportedOperationException (); 101 } 102 103 public void clearBody() 104 { 105 throw new UnsupportedOperationException (); 106 } 107 108 111 final public boolean isAutoFlush() 112 { 113 return this.autoFlush; 114 } 115 116 119 AbstractJspWriter popWriter() 120 { 121 return (AbstractJspWriter) _parent; 122 } 123 } 124 | Popular Tags |