1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.internal.mock.servlet;
21
22 import javax.servlet.jsp.JspWriter;
23 import java.io.IOException;
24 import java.io.PrintWriter;
25
26 public class MockJspWriter extends JspWriter {
27
28 private PrintWriter out;
29
30 public MockJspWriter(PrintWriter out) {
31 super(100, true);
32 this.out = out;
33 }
34
35 public boolean checkError() {
36 return out.checkError();
37 }
38
39 public void print(boolean b) {
40 out.print(b);
41 }
42
43 public void print(char c) {
44 out.print(c);
45 }
46
47 public void print(int i) {
48 out.print(i);
49 }
50
51 public void print(long l) {
52 out.print(l);
53 }
54
55 public void print(float f) {
56 out.print(f);
57 }
58
59 public void print(double d) {
60 out.print(d);
61 }
62
63 public void print(char[] s) {
64 out.print(s);
65 }
66
67 public void print(String s) {
68 out.print(s);
69 }
70
71 public void print(Object obj) {
72 out.print(obj);
73 }
74
75 public void println() {
76 out.println();
77 }
78
79 public void println(boolean x) {
80 out.println(x);
81 }
82
83 public void println(char x) {
84 out.println(x);
85 }
86
87 public void println(int x) {
88 out.println(x);
89 }
90
91 public void println(long x) {
92 out.println(x);
93 }
94
95 public void println(float x) {
96 out.println(x);
97 }
98
99 public void println(double x) {
100 out.println(x);
101 }
102
103 public void println(char[] x) {
104 out.println(x);
105 }
106
107 public void println(String x) {
108 out.println(x);
109 }
110
111 public void println(Object x) {
112 out.println(x);
113 }
114
115 public void write(int c) throws IOException {
116 out.write(c);
117 }
118
119 public void write(char[] cbuf) throws IOException {
120 out.write(cbuf);
121 }
122
123 public void write(String str) throws IOException {
124 out.write(str);
125 }
126
127 public void write(char[] cbuf, int off, int len) throws IOException {
128 out.write(cbuf, off, len);
129 }
130
131 public void write(String str, int off, int len) throws IOException {
132 out.write(str, off, len);
133 }
134
135 public void flush() throws IOException {
136 out.flush();
137 }
138
139 public void close() throws IOException {
140 out.close();
141 }
142
143 public void clear() throws IOException {
144 }
145
146 public void clearBuffer() throws IOException {
147 }
148
149 public int getRemaining() {
150 return 0;
151 }
152
153 public void newLine() throws IOException {
154 print(System.getProperty("line.separator"));
155 }
156
157 }