Source Code Cross Referenced for RenderHttpServletResponse.java in  » Ajax » zk » org » zkoss » web » portlet » 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 » Ajax » zk » org.zkoss.web.portlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* RenderHttpServletResponse.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Tue Jan 17 00:59:09     2006, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2006 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.web.portlet;
020:
021:        import javax.servlet.http.HttpServletResponse;
022:        import javax.portlet.RenderResponse;
023:
024:        import org.zkoss.web.servlet.ServletOutputStreamWrapper;
025:
026:        /**
027:         * A facade of RenderResponse that implements HttpServletRespose.
028:         *
029:         * @author tomyeh
030:         */
031:        public class RenderHttpServletResponse implements  HttpServletResponse {
032:            private final RenderResponse _res;
033:
034:            public static HttpServletResponse getInstance(RenderResponse res) {
035:                if (res instanceof  HttpServletResponse)
036:                    return (HttpServletResponse) res;
037:                return new RenderHttpServletResponse(res);
038:            }
039:
040:            private RenderHttpServletResponse(RenderResponse res) {
041:                if (res == null)
042:                    throw new IllegalArgumentException("null");
043:                _res = res;
044:            }
045:
046:            //-- ServletResponse --//
047:            public void flushBuffer() throws java.io.IOException {
048:                _res.flushBuffer();
049:            }
050:
051:            public int getBufferSize() {
052:                return _res.getBufferSize();
053:            }
054:
055:            public String getCharacterEncoding() {
056:                return _res.getCharacterEncoding();
057:            }
058:
059:            public String getContentType() {
060:                return _res.getContentType();
061:            }
062:
063:            public java.util.Locale getLocale() {
064:                return _res.getLocale();
065:            }
066:
067:            public javax.servlet.ServletOutputStream getOutputStream()
068:                    throws java.io.IOException {
069:                return ServletOutputStreamWrapper.getInstance(_res
070:                        .getPortletOutputStream());
071:            }
072:
073:            public java.io.PrintWriter getWriter() throws java.io.IOException {
074:                //Bug 1548478: content-type is required for some implementation (JBoss Portal)
075:                if (_res.getContentType() == null)
076:                    _res.setContentType("text/html;charset=UTF-8");
077:                return _res.getWriter();
078:            }
079:
080:            public boolean isCommitted() {
081:                return _res.isCommitted();
082:            }
083:
084:            public void reset() {
085:                _res.reset();
086:            }
087:
088:            public void resetBuffer() {
089:                _res.resetBuffer();
090:            }
091:
092:            public void setBufferSize(int size) {
093:                _res.setBufferSize(size);
094:            }
095:
096:            public void setCharacterEncoding(String charset) {
097:            }
098:
099:            public void setContentLength(int len) {
100:            }
101:
102:            public void setContentType(String type) {
103:                _res.setContentType(type);
104:            }
105:
106:            public void setLocale(java.util.Locale loc) {
107:            }
108:
109:            //-- HttpServletResponse --//
110:            public void addCookie(javax.servlet.http.Cookie cookie) {
111:            }
112:
113:            public void addDateHeader(String name, long date) {
114:            }
115:
116:            public void addHeader(String name, String value) {
117:            }
118:
119:            public void addIntHeader(String name, int value) {
120:            }
121:
122:            public boolean containsHeader(String name) {
123:                return false;
124:            }
125:
126:            /**
127:             * @deprecated
128:             */
129:            public String encodeRedirectUrl(String url) {
130:                return encodeRedirectURL(url);
131:            }
132:
133:            public String encodeRedirectURL(String url) {
134:                return encodeURL(url); //try our best
135:            }
136:
137:            /**
138:             * @deprecated
139:             */
140:            public String encodeUrl(String url) {
141:                return encodeURL(url);
142:            }
143:
144:            public String encodeURL(String url) {
145:                return _res.encodeURL(url);
146:            }
147:
148:            public void sendError(int sc) {
149:            }
150:
151:            public void sendError(int sc, String msg) {
152:            }
153:
154:            public void sendRedirect(String location) {
155:            }
156:
157:            public void setDateHeader(String name, long date) {
158:            }
159:
160:            public void setHeader(String name, String value) {
161:            }
162:
163:            public void setIntHeader(String name, int value) {
164:            }
165:
166:            public void setStatus(int sc) {
167:            }
168:
169:            /**
170:             * @deprecated
171:             */
172:            public void setStatus(int sc, String sm) {
173:            }
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.