1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.portlet;
21
22 import java.io.IOException;
23 import java.io.OutputStream;
24 import javax.portlet.*;
25
26 public class RenderResponseWrapper extends PortletResponseWrapper
27 implements RenderResponse
28 {
29 /***
30 * Creates a ServletResponse adaptor wrapping the given response object.
31 * @throws java.lang.IllegalArgumentException if the response is null.
32 */
33 public RenderResponseWrapper(RenderResponse renderResponse)
34 {
35 super(renderResponse);
36
37 if (renderResponse == null)
38 {
39 throw new IllegalArgumentException("Response cannot be null");
40 }
41 }
42
43
44 public String getContentType()
45 {
46 return this.getRenderResponse().getContentType();
47 }
48
49 public PortletURL createRenderURL()
50 {
51 return this.getRenderResponse().createRenderURL();
52 }
53
54 public PortletURL createActionURL()
55 {
56 return this.getRenderResponse().createActionURL();
57 }
58
59 public String getNamespace()
60 {
61 return this.getRenderResponse().getNamespace();
62 }
63
64 public void setTitle(String title)
65 {
66 this.getRenderResponse().setTitle(title);
67 }
68
69 public void setContentType(String type)
70 {
71 this.getRenderResponse().setContentType(type);
72 }
73
74 public String getCharacterEncoding()
75 {
76 return this.getRenderResponse().getCharacterEncoding();
77 }
78
79 public java.io.PrintWriter getWriter() throws java.io.IOException
80 {
81 return this.getRenderResponse().getWriter();
82 }
83
84 public java.util.Locale getLocale()
85 {
86 return this.getRenderResponse().getLocale();
87 }
88
89 public void setBufferSize(int size)
90 {
91 this.getRenderResponse().setBufferSize(size);
92 }
93
94 public int getBufferSize()
95 {
96 return this.getRenderResponse().getBufferSize();
97 }
98
99 public void flushBuffer() throws java.io.IOException
100 {
101 this.getRenderResponse().flushBuffer();
102 }
103
104 public void resetBuffer()
105 {
106 this.getRenderResponse().resetBuffer();
107 }
108
109 public boolean isCommitted()
110 {
111 return this.getRenderResponse().isCommitted();
112 }
113
114 public void reset()
115 {
116 this.getRenderResponse().reset();
117 }
118
119 public OutputStream getPortletOutputStream() throws IOException
120 {
121 return this.getRenderResponse().getPortletOutputStream();
122 }
123
124
125
126 /***
127 * Return the wrapped ServletResponse object.
128 */
129 public RenderResponse getRenderResponse()
130 {
131 return (RenderResponse) getPortletResponse();
132 }
133
134
135 }
136