1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package io.wcm.wcm.ui.granite.pathfield.impl.util;
21
22 import java.io.IOException;
23 import java.io.PrintWriter;
24 import java.io.Writer;
25
26 import javax.servlet.jsp.JspWriter;
27
28 import org.jetbrains.annotations.NotNull;
29
30
31
32
33
34 class JspWriterWrapper extends JspWriter {
35
36 private final PrintWriter writer;
37
38 JspWriterWrapper(@NotNull Writer writer) {
39 super(NO_BUFFER, true);
40 this.writer = new PrintWriter(writer);
41 }
42
43 @Override
44 public void print(boolean value) throws IOException {
45 writer.print(value);
46 }
47
48 @Override
49 public void print(char value) throws IOException {
50 writer.print(value);
51 }
52
53 @Override
54 public void print(int value) throws IOException {
55 writer.print(value);
56 }
57
58 @Override
59 public void print(long value) throws IOException {
60 writer.print(value);
61 }
62
63 @Override
64 public void print(float value) throws IOException {
65 writer.print(value);
66 }
67
68 @Override
69 public void print(double value) throws IOException {
70 writer.print(value);
71 }
72
73 @Override
74 public void print(char[] value) throws IOException {
75 writer.print(value);
76 }
77
78 @Override
79 public void print(String value) throws IOException {
80 writer.print(value);
81 }
82
83 @Override
84 public void print(Object value) throws IOException {
85 writer.print(value);
86 }
87
88 @Override
89 public void println() throws IOException {
90 writer.println();
91 }
92
93 @Override
94 public void println(boolean value) throws IOException {
95 writer.println(value);
96 }
97
98 @Override
99 public void println(char value) throws IOException {
100 writer.println(value);
101 }
102
103 @Override
104 public void println(int value) throws IOException {
105 writer.println(value);
106 }
107
108 @Override
109 public void println(long value) throws IOException {
110 writer.println(value);
111 }
112
113 @Override
114 public void println(float value) throws IOException {
115 writer.println(value);
116 }
117
118 @Override
119 public void println(double value) throws IOException {
120 writer.println(value);
121 }
122
123 @Override
124 public void println(char[] value) throws IOException {
125 writer.println(value);
126 }
127
128 @Override
129 public void println(String value) throws IOException {
130 writer.println(value);
131 }
132
133 @Override
134 public void println(Object value) throws IOException {
135 writer.println(value);
136 }
137
138 @Override
139 public void flush() throws IOException {
140 writer.flush();
141 throw new UnsupportedOperationException();
142 }
143
144 @Override
145 public void close() throws IOException {
146 writer.close();
147 }
148
149 @Override
150 public void write(char[] cbuf, int off, int len) throws IOException {
151 writer.write(cbuf, off, len);
152 }
153
154
155
156 @Override
157 public void newLine() throws IOException {
158 throw new UnsupportedOperationException();
159 }
160
161 @Override
162 public void clear() throws IOException {
163 throw new UnsupportedOperationException();
164 }
165
166 @Override
167 public void clearBuffer() throws IOException {
168 throw new UnsupportedOperationException();
169 }
170
171 @Override
172 public int getRemaining() {
173 throw new UnsupportedOperationException();
174 }
175
176 }