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   * @author Stan Silvert
31   */
32  public abstract class ResponseWriterWrapper extends ResponseWriter implements FacesWrapper<ResponseWriter>
33  {
34      @Override
35      public ResponseWriter cloneWithWriter(Writer writer)
36      {
37          return getWrapped().cloneWithWriter(writer);
38      }
39  
40      @Override
41      public void close() throws IOException
42      {
43          getWrapped().close();
44      }
45  
46      @Override
47      public void endCDATA() throws IOException
48      {
49          getWrapped().endCDATA();
50      }
51  
52      @Override
53      public void endDocument() throws IOException
54      {
55          getWrapped().endDocument();
56      }
57  
58      @Override
59      public void endElement(String name) throws IOException
60      {
61          getWrapped().endElement(name);
62      }
63  
64      @Override
65      public void flush() throws IOException
66      {
67          getWrapped().flush();
68      }
69  
70      @Override
71      public String getCharacterEncoding()
72      {
73          return getWrapped().getCharacterEncoding();
74      }
75  
76      @Override
77      public String getContentType()
78      {
79          return getWrapped().getContentType();
80      }
81  
82      public abstract ResponseWriter getWrapped();
83  
84      @Override
85      public void startCDATA() throws IOException
86      {
87          getWrapped().startCDATA();
88      }
89      
90      @Override
91      public void startDocument() throws IOException
92      {
93          getWrapped().startDocument();
94      }
95  
96      @Override
97      public void startElement(String name, UIComponent component) throws IOException
98      {
99          getWrapped().startElement(name, component);
100     }
101 
102     @Override
103     public void write(char[] cbuf, int off, int len) throws IOException
104     {
105         getWrapped().write(cbuf, off, len);
106     }
107 
108     @Override
109     public void writeAttribute(String name, Object value, String property) throws IOException
110     {
111         getWrapped().writeAttribute(name, value, property);
112     }
113 
114     @Override
115     public void writeComment(Object comment) throws IOException
116     {
117         getWrapped().writeComment(comment);
118     }
119 
120     @Override
121     public void writeText(char[] text, int off, int len) throws IOException
122     {
123         getWrapped().writeText(text, off, len);
124     }
125     
126     @Override
127     public void writeText(Object text, String property) throws IOException
128     {
129         getWrapped().writeText(text, property);
130     }
131 
132     /**
133      * @since 1.2
134      */
135     @Override
136     public void writeText(Object object, UIComponent component, String string) throws IOException
137     {
138         getWrapped().writeText(object, component, string);
139     }
140     
141     @Override
142     public void writeURIAttribute(String name, Object value, String property) throws IOException
143     {
144         getWrapped().writeURIAttribute(name, value, property);
145     }
146 
147 }