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 java.io.IOException;
24  import java.io.Writer;
25  
26  /**
27   * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
28   *
29   * @author Stan Silvert
30   */
31  public abstract class ResponseWriterWrapper extends ResponseWriter {
32      
33      protected abstract ResponseWriter getWrapped();
34  
35      public void endElement(String name) throws IOException {
36          getWrapped().endElement(name);
37      }
38  
39      public void writeComment(Object comment) throws IOException {
40          getWrapped().writeComment(comment);
41      }
42  
43      public void startElement(String name, UIComponent component) throws IOException {
44          getWrapped().startElement(name, component);
45      }
46  
47      public void writeText(Object text, String property) throws IOException {
48          getWrapped().writeText(text, property);
49      }
50  
51      public void writeText(char[] text, int off, int len) throws IOException {
52          getWrapped().writeText(text, off, len);
53      }
54  
55      public void write(char[] cbuf, int off, int len) throws IOException {
56          getWrapped().write(cbuf, off, len);
57      }
58  
59      public ResponseWriter cloneWithWriter(Writer writer) {
60          return getWrapped().cloneWithWriter(writer);
61      }
62  
63      public void writeURIAttribute(String name, Object value, String property) throws IOException {
64          getWrapped().writeURIAttribute(name, value,property);
65      }
66  
67      public void close() throws IOException {
68          getWrapped().close();
69      }
70  
71      public void endDocument() throws IOException {
72          getWrapped().endDocument();
73      }
74  
75      public void flush() throws IOException {
76          getWrapped().flush();
77      }
78  
79      public String getCharacterEncoding() {
80          return getWrapped().getCharacterEncoding();
81      }
82  
83      public String getContentType() {
84          return getWrapped().getContentType();
85      }
86  
87      public void startDocument() throws IOException {
88          getWrapped().startDocument();
89      }
90  
91      public void writeAttribute(String name, Object value, String property) throws IOException {
92          getWrapped().writeAttribute(name, value, property);
93      }
94      
95      /**
96       * @since 1.2
97       */
98      public void writeText(Object object, UIComponent component, String string) throws IOException
99      {
100         getWrapped().writeText(object, component, string);
101     }
102     
103 }