1
14
15 package com.liferay.portlet;
16
17 import java.io.BufferedReader;
18 import java.io.IOException;
19 import java.io.InputStream;
20 import java.io.UnsupportedEncodingException;
21
22 import javax.portlet.ClientDataRequest;
23
24
29 public abstract class ClientDataRequestImpl
30 extends PortletRequestImpl implements ClientDataRequest {
31
32 public String getCharacterEncoding() {
33 return getHttpServletRequest().getCharacterEncoding();
34 }
35
36 public int getContentLength() {
37 return getHttpServletRequest().getContentLength();
38 }
39
40 public String getContentType() {
41 return getHttpServletRequest().getContentType();
42 }
43
44 public String getMethod() {
45 return getHttpServletRequest().getMethod();
46 }
47
48 public InputStream getPortletInputStream() throws IOException {
49 return getHttpServletRequest().getInputStream();
50 }
51
52 public BufferedReader getReader()
53 throws IOException, UnsupportedEncodingException {
54
55 _calledGetReader = true;
56
57 return getHttpServletRequest().getReader();
58 }
59
60 public void setCharacterEncoding(String enc)
61 throws UnsupportedEncodingException {
62
63 if (_calledGetReader) {
64 throw new IllegalStateException();
65 }
66
67 getHttpServletRequest().setCharacterEncoding(enc);
68 }
69
70 private boolean _calledGetReader;
71
72 }