Source Code Cross Referenced for HttpServletResponseWrapper.java in  » 6.0-JDK-Core » Servlet-API-by-tomcat » javax » servlet » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Servlet API by tomcat » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2004 The Apache Software Foundation
003         *
004         * Licensed under the Apache License, Version 2.0 (the "License");
005         * you may not use this file except in compliance with the License.
006         * You may obtain a copy of the License at
007         *
008         *     http://www.apache.org/licenses/LICENSE-2.0
009         *
010         * Unless required by applicable law or agreed to in writing, software
011         * distributed under the License is distributed on an "AS IS" BASIS,
012         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013         * See the License for the specific language governing permissions and
014         * limitations under the License.
015         */
016        package javax.servlet.http;
017
018        import java.io.IOException;
019
020        import javax.servlet.ServletResponseWrapper;
021
022        /**
023         * 
024         * Provides a convenient implementation of the HttpServletResponse interface that
025         * can be subclassed by developers wishing to adapt the response from a Servlet.
026         * This class implements the Wrapper or Decorator pattern. Methods default to
027         * calling through to the wrapped response object.
028         * 
029         * @author 	Various
030         * @version 	$Version$
031         * @since	v 2.3
032         *
033         * @see 	javax.servlet.http.HttpServletResponse
034         *
035         */
036
037        public class HttpServletResponseWrapper extends ServletResponseWrapper
038                implements  HttpServletResponse {
039
040            /** 
041             * Constructs a response adaptor wrapping the given response.
042             * @throws java.lang.IllegalArgumentException if the response is null
043             */
044            public HttpServletResponseWrapper(HttpServletResponse response) {
045                super (response);
046            }
047
048            private HttpServletResponse _getHttpServletResponse() {
049                return (HttpServletResponse) super .getResponse();
050            }
051
052            /**
053             * The default behavior of this method is to call addCookie(Cookie cookie)
054             * on the wrapped response object.
055             */
056            public void addCookie(Cookie cookie) {
057                this ._getHttpServletResponse().addCookie(cookie);
058            }
059
060            /**
061             * The default behavior of this method is to call containsHeader(String name)
062             * on the wrapped response object.
063             */
064
065            public boolean containsHeader(String name) {
066                return this ._getHttpServletResponse().containsHeader(name);
067            }
068
069            /**
070             * The default behavior of this method is to call encodeURL(String url)
071             * on the wrapped response object.
072             */
073            public String encodeURL(String url) {
074                return this ._getHttpServletResponse().encodeURL(url);
075            }
076
077            /**
078             * The default behavior of this method is to return encodeRedirectURL(String url)
079             * on the wrapped response object.
080             */
081            public String encodeRedirectURL(String url) {
082                return this ._getHttpServletResponse().encodeRedirectURL(url);
083            }
084
085            /**
086             * The default behavior of this method is to call encodeUrl(String url)
087             * on the wrapped response object.
088             */
089            public String encodeUrl(String url) {
090                return this ._getHttpServletResponse().encodeUrl(url);
091            }
092
093            /**
094             * The default behavior of this method is to return encodeRedirectUrl(String url)
095             * on the wrapped response object.
096             */
097            public String encodeRedirectUrl(String url) {
098                return this ._getHttpServletResponse().encodeRedirectUrl(url);
099            }
100
101            /**
102             * The default behavior of this method is to call sendError(int sc, String msg)
103             * on the wrapped response object.
104             */
105            public void sendError(int sc, String msg) throws IOException {
106                this ._getHttpServletResponse().sendError(sc, msg);
107            }
108
109            /**
110             * The default behavior of this method is to call sendError(int sc)
111             * on the wrapped response object.
112             */
113
114            public void sendError(int sc) throws IOException {
115                this ._getHttpServletResponse().sendError(sc);
116            }
117
118            /**
119             * The default behavior of this method is to return sendRedirect(String location)
120             * on the wrapped response object.
121             */
122            public void sendRedirect(String location) throws IOException {
123                this ._getHttpServletResponse().sendRedirect(location);
124            }
125
126            /**
127             * The default behavior of this method is to call setDateHeader(String name, long date)
128             * on the wrapped response object.
129             */
130            public void setDateHeader(String name, long date) {
131                this ._getHttpServletResponse().setDateHeader(name, date);
132            }
133
134            /**
135             * The default behavior of this method is to call addDateHeader(String name, long date)
136             * on the wrapped response object.
137             */
138            public void addDateHeader(String name, long date) {
139                this ._getHttpServletResponse().addDateHeader(name, date);
140            }
141
142            /**
143             * The default behavior of this method is to return setHeader(String name, String value)
144             * on the wrapped response object.
145             */
146            public void setHeader(String name, String value) {
147                this ._getHttpServletResponse().setHeader(name, value);
148            }
149
150            /**
151             * The default behavior of this method is to return addHeader(String name, String value)
152             * on the wrapped response object.
153             */
154            public void addHeader(String name, String value) {
155                this ._getHttpServletResponse().addHeader(name, value);
156            }
157
158            /**
159             * The default behavior of this method is to call setIntHeader(String name, int value)
160             * on the wrapped response object.
161             */
162            public void setIntHeader(String name, int value) {
163                this ._getHttpServletResponse().setIntHeader(name, value);
164            }
165
166            /**
167             * The default behavior of this method is to call addIntHeader(String name, int value)
168             * on the wrapped response object.
169             */
170            public void addIntHeader(String name, int value) {
171                this ._getHttpServletResponse().addIntHeader(name, value);
172            }
173
174            /**
175             * The default behavior of this method is to call setStatus(int sc)
176             * on the wrapped response object.
177             */
178
179            public void setStatus(int sc) {
180                this ._getHttpServletResponse().setStatus(sc);
181            }
182
183            /**
184             * The default behavior of this method is to call setStatus(int sc, String sm)
185             * on the wrapped response object.
186             */
187            public void setStatus(int sc, String sm) {
188                this._getHttpServletResponse().setStatus(sc, sm);
189            }
190
191        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.