public interface RequestContext
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known.
|
InputStream |
getInputStream()
Retrieves the body of the HTTP request from client to portal as binary data using an
InputStream. |
BufferedReader |
getReader()
Retrieves the body of the HTTP request from the client to the portal as character data using a
BufferedReader. |
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.int getContentLength()
String getContentType()
String containing the name of the MIME type of the request, or null if the type is not
known.BufferedReader getReader() throws IOException
BufferedReader. The reader translates the character data according to the character encoding used on
the body. Either this method or getInputStream() 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 requestUnsupportedEncodingException - if the character set encoding used is not supported and
the text cannot be decodedIllegalStateException - if getInputStream() method has been called on this request,
it is a HTTP POST data of type application/x-www-form-urlencoded.IOException - if an input or output exception occurredgetInputStream()InputStream getInputStream() throws IOException, IllegalStateException
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.IllegalStateException - if getReader was already called, or it is a HTTP POST data of type
application/x-www-form-urlencodedIOException - if an input or output exception occurredCopyright © 2003-2018 GateIn. All Rights Reserved.