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