Source Code Cross Referenced for HttpServletResponseWrapper.java in  » Sevlet-Container » apache-tomcat-6.0.14 » javax » servlet » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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