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 javax.portlet.*;
23
24 public class ActionRequestWrapper extends PortletRequestWrapper
25 implements ActionRequest
26 {
27
28 /***
29 * Creates a ServletRequest adaptor wrapping the given request object.
30 * @throws java.lang.IllegalArgumentException if the request is null.
31 */
32 public ActionRequestWrapper(ActionRequest actionRequest)
33 {
34 super(actionRequest);
35
36 if (actionRequest == null)
37 {
38 throw new IllegalArgumentException("Request cannot be null");
39 }
40 }
41
42
43 public java.io.InputStream getPortletInputStream () throws java.io.IOException
44 {
45 return this.getActionRequest().getPortletInputStream();
46 }
47
48 public void setCharacterEncoding(String enc)
49 throws java.io.UnsupportedEncodingException
50 {
51 this.getActionRequest().setCharacterEncoding(enc);
52 }
53
54 public java.io.BufferedReader getReader()
55 throws java.io.UnsupportedEncodingException, java.io.IOException
56 {
57 return this.getActionRequest().getReader();
58 }
59
60 public java.lang.String getCharacterEncoding()
61 {
62 return this.getActionRequest().getCharacterEncoding();
63 }
64
65 public java.lang.String getContentType()
66 {
67 return this.getActionRequest().getContentType();
68 }
69
70 public int getContentLength()
71 {
72 return this.getActionRequest().getContentLength();
73 }
74
75
76
77
78 /***
79 * Return the wrapped ServletRequest object.
80 */
81 public ActionRequest getActionRequest()
82 {
83 return (ActionRequest) getPortletRequest();
84 }
85
86
87 }
88