ClientDataRequestWrapper
provides a convenient implementation of the ClientDataRequest
interface that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern. Methods default to
calling through to the wrapped request object. | Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getCharacterEncoding()
Implements javax. |
| public int | getContentLength()
Implements javax. |
| public long | getContentLengthLong()
Implements javax.
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.
|
| public String | getContentType()
Implements javax. |
| public String | getMethod()
Implements javax. |
| public Part | getPart(String
- the name of the requested Part name)Implements javax.
Gets the Part with the given name.
|
| public Collection | getParts()
Implements javax.
Gets all the Part components of this request, provided that it is of type multipart/form-data.
|
| public InputStream | getPortletInputStream()
Implements javax. InputStream.
|
| public BufferedReader | getReader()
Implements javax. BufferedReader.
|
| public ClientDataRequest | Returns: the wrapped requestOverrides javax. |
| public void | setCharacterEncoding(String
a enc)String containing the name of
the character encoding.Implements javax. |
| public void |
| ClientDataRequestWrapper | back to summary |
|---|---|
| public ClientDataRequestWrapper(ClientDataRequest request) | |
| getCharacterEncoding | back to summary |
|---|---|
| public String getCharacterEncoding() Implements javax. Doc from javax. Returns the name of the character encoding used in the body of this request.
This method returns
| |
| getContentLength | back to summary |
|---|---|
| public int getContentLength() Implements javax. Doc from javax. 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.
| |
| getContentLengthLong | back to summary |
|---|---|
| public long getContentLengthLong() Implements javax. Doc from javax.
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.
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Implements javax. Doc from javax. Returns the MIME type of the body of the request, or null if the type is not known.
| |
| getMethod | back to summary |
|---|---|
| public String getMethod() Implements javax. Doc from javax. Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
| |
| getPart | back to summary |
|---|---|
| public Part getPart(String name) throws IOException, PortletException Implements javax. Doc from javax.
Gets the Part with the given name.
| |
| getParts | back to summary |
|---|---|
| public Collection Implements javax. Doc from javax.
Gets all the Part components of this request, provided that it is of type multipart/form-data.
If this request is of type multipart/form-data, but does not contain any Part components, the returned Collection will be empty. Any changes to the returned Collection must not affect this request object.
| |
| getPortletInputStream | back to summary |
|---|---|
| public InputStream getPortletInputStream() throws IOException Implements javax. Doc from javax. Retrieves the body of the HTTP request from client to
portal as binary data using
an
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an
| |
| getReader | back to summary |
|---|---|
| public BufferedReader getReader() throws UnsupportedEncodingException, IOException Implements javax. Doc from javax. Retrieves the body of the HTTP request from the client to the portal
as character data using
a
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an
| |
| getRequest | back to summary |
|---|---|
| public ClientDataRequest getRequest() Overrides javax. Return the wrapped request object.
| |
| setCharacterEncoding | back to summary |
|---|---|
| public void setCharacterEncoding(String enc) throws UnsupportedEncodingException Implements javax. Doc from javax. Overrides the name of the character encoding used in the body of this
request. This method must be called prior to reading input
using
This method only sets the character set for the Reader that the
| |
| setRequest | back to summary |
|---|---|
| public void setRequest(ClientDataRequest request) Sets the request object being wrapped.
| |