001
014
015 package com.liferay.portlet;
016
017 import java.io.BufferedReader;
018 import java.io.IOException;
019 import java.io.InputStream;
020 import java.io.UnsupportedEncodingException;
021
022 import javax.portlet.ClientDataRequest;
023
024
027 public abstract class ClientDataRequestImpl
028 extends PortletRequestImpl implements ClientDataRequest {
029
030 public String getCharacterEncoding() {
031 return getHttpServletRequest().getCharacterEncoding();
032 }
033
034 public int getContentLength() {
035 return getHttpServletRequest().getContentLength();
036 }
037
038 public String getContentType() {
039 return getHttpServletRequest().getContentType();
040 }
041
042 public String getMethod() {
043 return getHttpServletRequest().getMethod();
044 }
045
046 public InputStream getPortletInputStream() throws IOException {
047 return getHttpServletRequest().getInputStream();
048 }
049
050 public BufferedReader getReader()
051 throws IOException, UnsupportedEncodingException {
052
053 _calledGetReader = true;
054
055 return getHttpServletRequest().getReader();
056 }
057
058 public void setCharacterEncoding(String enc)
059 throws UnsupportedEncodingException {
060
061 if (_calledGetReader) {
062 throw new IllegalStateException();
063 }
064
065 getHttpServletRequest().setCharacterEncoding(enc);
066 }
067
068 private boolean _calledGetReader;
069
070 }