View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package javax.faces.context;
21  
22  import javax.faces.component.UIComponent;
23  import javax.faces.FacesWrapper;
24  import java.io.IOException;
25  import java.io.Writer;
26  
27  /**
28   * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
29   */
30  public abstract class ResponseWriterWrapper extends ResponseWriter implements FacesWrapper<ResponseWriter>
31  {
32      private ResponseWriter delegate;
33  
34      @Deprecated
35      public ResponseWriterWrapper()
36      {
37      }
38  
39      public ResponseWriterWrapper(ResponseWriter delegate)
40      {
41          this.delegate = delegate;
42      }
43      
44      @Override
45      public ResponseWriter cloneWithWriter(Writer writer)
46      {
47          return getWrapped().cloneWithWriter(writer);
48      }
49  
50      @Override
51      public void close() throws IOException
52      {
53          getWrapped().close();
54      }
55  
56      @Override
57      public void endCDATA() throws IOException
58      {
59          getWrapped().endCDATA();
60      }
61  
62      @Override
63      public void endDocument() throws IOException
64      {
65          getWrapped().endDocument();
66      }
67  
68      @Override
69      public void endElement(String name) throws IOException
70      {
71          getWrapped().endElement(name);
72      }
73  
74      @Override
75      public void flush() throws IOException
76      {
77          getWrapped().flush();
78      }
79  
80      @Override
81      public String getCharacterEncoding()
82      {
83          return getWrapped().getCharacterEncoding();
84      }
85  
86      @Override
87      public String getContentType()
88      {
89          return getWrapped().getContentType();
90      }
91  
92      @Override
93      public ResponseWriter getWrapped()
94      {
95          return delegate;
96      }
97  
98      @Override
99      public void startCDATA() throws IOException
100     {
101         getWrapped().startCDATA();
102     }
103     
104     @Override
105     public void startDocument() throws IOException
106     {
107         getWrapped().startDocument();
108     }
109 
110     @Override
111     public void startElement(String name, UIComponent component) throws IOException
112     {
113         getWrapped().startElement(name, component);
114     }
115 
116     @Override
117     public void write(char[] cbuf, int off, int len) throws IOException
118     {
119         getWrapped().write(cbuf, off, len);
120     }
121 
122     @Override
123     public void writeAttribute(String name, Object value, String property) throws IOException
124     {
125         getWrapped().writeAttribute(name, value, property);
126     }
127 
128     @Override
129     public void writeComment(Object comment) throws IOException
130     {
131         getWrapped().writeComment(comment);
132     }
133 
134     @Override
135     public void writeText(char[] text, int off, int len) throws IOException
136     {
137         getWrapped().writeText(text, off, len);
138     }
139     
140     @Override
141     public void writeText(Object text, String property) throws IOException
142     {
143         getWrapped().writeText(text, property);
144     }
145 
146     @Override
147     public void writeText(Object object, UIComponent component, String string) throws IOException
148     {
149         getWrapped().writeText(object, component, string);
150     }
151     
152     @Override
153     public void writeURIAttribute(String name, Object value, String property) throws IOException
154     {
155         getWrapped().writeURIAttribute(name, value, property);
156     }
157 
158     @Override
159     public void writeDoctype(String doctype) throws IOException
160     {
161         getWrapped().writeDoctype(doctype);
162     }
163 
164     @Override
165     public void writePreamble(String preamble) throws IOException
166     {
167         getWrapped().writePreamble(preamble);
168     }
169 }