Class PortletRequestContext
- java.lang.Object
-
- org.apache.commons.fileupload.portlet.PortletRequestContext
-
- All Implemented Interfaces:
RequestContext,UploadContext
public class PortletRequestContext extends java.lang.Object implements UploadContext
Provides access to the request information needed for a request made to a portlet.
- Since:
- FileUpload 1.1
-
-
Constructor Summary
Constructors Constructor Description PortletRequestContext(javax.portlet.ActionRequest request)Construct a context for this request.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longcontentLength()Retrieve the content length of the request.java.lang.StringgetCharacterEncoding()Retrieve the character encoding for the request.intgetContentLength()Deprecated.1.3 UsecontentLength()insteadjava.lang.StringgetContentType()Retrieve the content type of the request.java.io.InputStreamgetInputStream()Retrieve the input stream for the request.java.lang.StringtoString()Returns a string representation of this object.
-
-
-
Method Detail
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
Retrieve the character encoding for the request.- Specified by:
getCharacterEncodingin interfaceRequestContext- Returns:
- The character encoding for the request.
-
getContentType
public java.lang.String getContentType()
Retrieve the content type of the request.- Specified by:
getContentTypein interfaceRequestContext- Returns:
- The content type of the request.
-
getContentLength
@Deprecated public int getContentLength()
Deprecated.1.3 UsecontentLength()insteadRetrieve the content length of the request.- Specified by:
getContentLengthin interfaceRequestContext- Returns:
- The content length of the request.
-
contentLength
public long contentLength()
Retrieve the content length of the request.- Specified by:
contentLengthin interfaceUploadContext- Returns:
- The content length of the request.
- Since:
- 1.3
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionRetrieve the input stream for the request.- Specified by:
getInputStreamin interfaceRequestContext- Returns:
- The input stream for the request.
- Throws:
java.io.IOException- if a problem occurs.
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this object.
-
-