|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ActionRequest
represents the request sent to the portlet
to handle an action.
It extends the PortletRequest interface to provide action request
information to portlets.
The portlet container creates an ActionRequest
object and
passes it as argument to the portlet's processAction
method.
PortletRequest
,
RenderRequest
Field Summary |
Fields inherited from interface javax.portlet.PortletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, USER_INFO |
Method Summary | |
java.lang.String |
getCharacterEncoding()
Returns the name of the character encoding used in the body of this request. |
int |
getContentLength()
Returns the length, in bytes, of the request body which is made available by the input stream, or -1 if the length is not known. |
java.lang.String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
java.io.InputStream |
getPortletInputStream()
Retrieves the body of the HTTP request from client to portal as binary data using an InputStream . |
java.io.BufferedReader |
getReader()
Retrieves the body of the HTTP request from the client to the portal as character data using a BufferedReader . |
void |
setCharacterEncoding(java.lang.String enc)
Overrides the name of the character encoding used in the body of this request. |
Method Detail |
public java.lang.String getCharacterEncoding()
null
if the request
does not specify a character encoding.
String
containing the name of
the chararacter encoding, or null
if the request does not specify a character encoding.public int getContentLength()
public java.lang.String getContentType()
String
containing the name
of the MIME type of the request, or null
if the type is not known.public java.io.InputStream getPortletInputStream() throws java.lang.IllegalStateException, java.io.IOException
InputStream
. Either this method or
getReader()
may be called to read the body, but not both.
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an IllegalStateException
as this data has been already processed by the
portal/portlet-container and is available as request parameters.
java.lang.IllegalStateException
- if getReader was already called, or it is a
HTTP POST data of type application/x-www-form-urlencoded
java.io.IOException
- if an input or output exception occurredpublic java.io.BufferedReader getReader() throws java.io.UnsupportedEncodingException, java.lang.IllegalStateException, java.io.IOException
BufferedReader
. The reader translates the character
data according to the character encoding used on the body.
Either this method or getPortletInputStream()
may be called to read the
body, not both.
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an IllegalStateException
as this data has been already processed by the
portal/portlet-container and is available as request parameters.
BufferedReader
containing the body of the request
java.io.UnsupportedEncodingException
- if the character set encoding used is
not supported and the text cannot be decoded
java.lang.IllegalStateException
- if getPortletInputStream()
method
has been called on this request, it is a
HTTP POST data of type application/x-www-form-urlencoded.
java.io.IOException
- if an input or output exception occurredgetPortletInputStream()
public void setCharacterEncoding(java.lang.String enc) throws java.io.UnsupportedEncodingException, java.lang.IllegalStateException
getReader()
or getPortletInputStream()
.
This method only sets the character set for the Reader that the
getReader()
method returns.
enc
- a String
containing the name of
the chararacter encoding.
java.io.UnsupportedEncodingException
- if this is not a valid encoding
java.lang.IllegalStateException
- if this method is called after
reading request parameters or reading input using
getReader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |