001: /*
002: * Version: MPL 1.1/GPL 2.0/LGPL 2.1
003: *
004: * "The contents of this file are subject to the Mozilla Public License
005: * Version 1.1 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License at
007: * http://www.mozilla.org/MPL/
008: *
009: * Software distributed under the License is distributed on an "AS IS"
010: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
011: * License for the specific language governing rights and limitations under
012: * the License.
013: *
014: * The Original Code is ICEfaces 1.5 open source software code, released
015: * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
016: * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
017: * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
018: *
019: * Contributor(s): _____________________.
020: *
021: * Alternatively, the contents of this file may be used under the terms of
022: * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
023: * License), in which case the provisions of the LGPL License are
024: * applicable instead of those above. If you wish to allow use of your
025: * version of this file only under the terms of the LGPL License and not to
026: * allow others to use your version of this file under the MPL, indicate
027: * your decision by deleting the provisions above and replace them with
028: * the notice and other provisions required by the LGPL License. If you do
029: * not delete the provisions above, a recipient may use your version of
030: * this file under either the MPL or the LGPL License."
031: *
032: */
033:
034: package com.icesoft.faces.webapp.parser;
035:
036: import javax.servlet.jsp.JspWriter;
037: import java.io.IOException;
038: import java.io.Writer;
039:
040: //Stubbed-out class for debugging tags that write to the body
041:
042: public class JspWriterImpl extends JspWriter {
043:
044: private Writer out;
045:
046: public JspWriterImpl(Writer out) {
047: super (2000, true);
048: this .out = out;
049: }
050:
051: public final void clear() throws IOException {
052: }
053:
054: public void clearBuffer() throws IOException {
055: }
056:
057: public void flush() throws IOException {
058: if (null != out) {
059: out.flush();
060: }
061: }
062:
063: public void close() throws IOException {
064: if (null != out) {
065: out.close();
066: }
067: out = null;
068: }
069:
070: public int getRemaining() {
071: return 2000;
072: }
073:
074: public void write(int c) throws IOException {
075: out.write(c);
076: }
077:
078: public void write(char cbuf[], int off, int len) throws IOException {
079: out.write(cbuf, off, len);
080:
081: }
082:
083: public void write(char buf[]) throws IOException {
084: write(buf, 0, buf.length);
085: }
086:
087: public void write(String s, int off, int len) throws IOException {
088: out.write(s, off, len);
089: }
090:
091: public void write(String s) throws IOException {
092: write(s, 0, s.length());
093: }
094:
095: static String lineSeparator = System.getProperty("line.separator");
096:
097: public void newLine() throws IOException {
098: write(lineSeparator);
099: }
100:
101: public void print(boolean b) throws IOException {
102: write(b ? "true" : "false");
103: }
104:
105: public void print(char c) throws IOException {
106: write(String.valueOf(c));
107: }
108:
109: public void print(int i) throws IOException {
110: write(String.valueOf(i));
111: }
112:
113: public void print(long l) throws IOException {
114: write(String.valueOf(l));
115: }
116:
117: public void print(float f) throws IOException {
118: write(String.valueOf(f));
119: }
120:
121: public void print(double d) throws IOException {
122: write(String.valueOf(d));
123: }
124:
125: public void print(char s[]) throws IOException {
126: write(s);
127: }
128:
129: public void print(String s) throws IOException {
130: if (null == s) {
131: s = "null";
132: }
133: write(s);
134: }
135:
136: public void print(Object obj) throws IOException {
137: write(String.valueOf(obj));
138: }
139:
140: public void println() throws IOException {
141: newLine();
142: }
143:
144: public void println(boolean x) throws IOException {
145: print(x);
146: println();
147: }
148:
149: public void println(char x) throws IOException {
150: print(x);
151: println();
152: }
153:
154: public void println(int x) throws IOException {
155: print(x);
156: println();
157: }
158:
159: public void println(long x) throws IOException {
160: print(x);
161: println();
162: }
163:
164: public void println(float x) throws IOException {
165: print(x);
166: println();
167: }
168:
169: public void println(double x) throws IOException {
170: print(x);
171: println();
172: }
173:
174: public void println(char x[]) throws IOException {
175: print(x);
176: println();
177: }
178:
179: public void println(String x) throws IOException {
180: print(x);
181: println();
182: }
183:
184: public void println(Object x) throws IOException {
185: print(x);
186: println();
187: }
188:
189: }
|