| 1 33 34 package com.icesoft.faces.webapp.parser; 35 36 import javax.servlet.jsp.JspWriter ; 37 import java.io.IOException ; 38 import java.io.Writer ; 39 40 42 public class JspWriterImpl extends JspWriter { 43 44 private Writer out; 45 46 public JspWriterImpl(Writer out) { 47 super(2000, true); 48 this.out = out; 49 } 50 51 public final void clear() throws IOException { 52 } 53 54 public void clearBuffer() throws IOException { 55 } 56 57 public void flush() throws IOException { 58 if (null != out) { 59 out.flush(); 60 } 61 } 62 63 public void close() throws IOException { 64 if (null != out) { 65 out.close(); 66 } 67 out = null; 68 } 69 70 public int getRemaining() { 71 return 2000; 72 } 73 74 75 public void write(int c) throws IOException { 76 out.write(c); 77 } 78 79 public void write(char cbuf[], int off, int len) 80 throws IOException { 81 out.write(cbuf, off, len); 82 83 } 84 85 86 public void write(char buf[]) throws IOException { 87 write(buf, 0, buf.length); 88 } 89 90 91 public void write(String s, int off, int len) throws IOException { 92 out.write(s, off, len); 93 } 94 95 public void write(String s) throws IOException { 96 write(s, 0, s.length()); 97 } 98 99 static String lineSeparator = System.getProperty("line.separator"); 100 101 public void newLine() throws IOException { 102 write(lineSeparator); 103 } 104 105 public void print(boolean b) throws IOException { 106 write(b ? "true" : "false"); 107 } 108 109 public void print(char c) throws IOException { 110 write(String.valueOf(c)); 111 } 112 113 public void print(int i) throws IOException { 114 write(String.valueOf(i)); 115 } 116 117 public void print(long l) throws IOException { 118 write(String.valueOf(l)); 119 } 120 121 public void print(float f) throws IOException { 122 write(String.valueOf(f)); 123 } 124 125 public void print(double d) throws IOException { 126 write(String.valueOf(d)); 127 } 128 129 public void print(char s[]) throws IOException { 130 write(s); 131 } 132 133 public void print(String s) throws IOException { 134 if (null == s) { 135 s = "null"; 136 } 137 write(s); 138 } 139 140 public void print(Object obj) throws IOException { 141 write(String.valueOf(obj)); 142 } 143 144 public void println() throws IOException { 145 newLine(); 146 } 147 148 public void println(boolean x) throws IOException { 149 print(x); 150 println(); 151 } 152 153 public void println(char x) throws IOException { 154 print(x); 155 println(); 156 } 157 158 public void println(int x) throws IOException { 159 print(x); 160 println(); 161 } 162 163 public void println(long x) throws IOException { 164 print(x); 165 println(); 166 } 167 168 public void println(float x) throws IOException { 169 print(x); 170 println(); 171 } 172 173 public void println(double x) throws IOException { 174 print(x); 175 println(); 176 } 177 178 public void println(char x[]) throws IOException { 179 print(x); 180 println(); 181 } 182 183 public void println(String x) throws IOException { 184 print(x); 185 println(); 186 } 187 188 public void println(Object x) throws IOException { 189 print(x); 190 println(); 191 } 192 193 } 194 | Popular Tags |