1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.myfaces.context;
17
18 import javax.faces.component.UIComponent;
19 import javax.faces.context.ResponseWriter;
20 import java.io.IOException;
21 import java.io.Writer;
22
23 /***
24 * Convenient base class for writing a ResponseWriter wrapper class.
25 *
26 * @author Manfred Geiler
27 */
28 public abstract class ResponseWriterWrapper
29 extends ResponseWriter
30 {
31 protected ResponseWriter _responseWriter;
32
33 public ResponseWriterWrapper(ResponseWriter responseWriter)
34 {
35 _responseWriter = responseWriter;
36 }
37
38 public String getContentType()
39 {
40 return _responseWriter.getContentType();
41 }
42
43 public String getCharacterEncoding()
44 {
45 return _responseWriter.getCharacterEncoding();
46 }
47
48 public void flush() throws IOException
49 {
50 _responseWriter.flush();
51 }
52
53 public void startDocument() throws IOException
54 {
55 _responseWriter.startDocument();
56 }
57
58 public void endDocument() throws IOException
59 {
60 _responseWriter.endDocument();
61 }
62
63 public void startElement(String s, UIComponent uicomponent) throws IOException
64 {
65 _responseWriter.startElement(s, uicomponent);
66 }
67
68 public void endElement(String s) throws IOException
69 {
70 _responseWriter.endElement(s);
71 }
72
73 public void writeAttribute(String s, Object obj, String s1) throws IOException
74 {
75 _responseWriter.writeAttribute(s, obj, s1);
76 }
77
78 public void writeURIAttribute(String s, Object obj, String s1) throws IOException
79 {
80 _responseWriter.writeURIAttribute(s, obj, s1);
81 }
82
83 public void writeComment(Object obj) throws IOException
84 {
85 _responseWriter.writeComment(obj);
86 }
87
88 public void writeText(Object obj, String s) throws IOException
89 {
90 _responseWriter.writeText(obj, s);
91 }
92
93 public void writeText(char ac[], int i, int j) throws IOException
94 {
95 _responseWriter.writeText(ac, i, j);
96 }
97
98 public abstract ResponseWriter cloneWithWriter(Writer writer);
99
100 public void close() throws IOException
101 {
102 _responseWriter.close();
103 }
104
105 public void write(char cbuf[], int off, int len) throws IOException
106 {
107 _responseWriter.write(cbuf, off, len);
108 }
109
110 public void write(int c) throws IOException
111 {
112 _responseWriter.write(c);
113 }
114
115 public void write(char cbuf[]) throws IOException
116 {
117 _responseWriter.write(cbuf);
118 }
119
120 public void write(String str) throws IOException
121 {
122 _responseWriter.write(str);
123 }
124
125 public void write(String str, int off, int len) throws IOException
126 {
127 _responseWriter.write(str, off, len);
128 }
129 }