|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.portal.portlet.impl.spi.AbstractRequestContext
public class AbstractRequestContext
| Constructor Summary | |
|---|---|
AbstractRequestContext(javax.servlet.http.HttpServletRequest clientRequest)
|
|
| 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 |
getInputStream()
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractRequestContext(javax.servlet.http.HttpServletRequest clientRequest)
| Method Detail |
|---|
public java.lang.String getCharacterEncoding()
RequestContextnull
if the request does not specify a character encoding.
getCharacterEncoding in interface RequestContextString containing the name of the chararacter encoding, or null if the
request does not specify a character encoding.
public java.io.BufferedReader getReader()
throws java.io.IOException
RequestContextBufferedReader. The reader translates the character data according to the character encoding used on
the body. Either this method or RequestContext.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.
getReader in interface RequestContextBufferedReader 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.io.IOException - if an input or output exception occurredRequestContext.getInputStream()
public java.io.InputStream getInputStream()
throws java.io.IOException
RequestContextInputStream.
Either this method or RequestContext.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.
getInputStream in interface RequestContextjava.io.IOException - if an input or output exception occurredpublic int getContentLength()
RequestContext
getContentLength in interface RequestContextpublic java.lang.String getContentType()
RequestContext
getContentType in interface RequestContextString containing the name of the MIME type of the request, or null if the type is not
known.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||