Class JavaxServletRequestContext
- java.lang.Object
-
- org.apache.commons.fileupload2.core.AbstractRequestContext<javax.servlet.http.HttpServletRequest>
-
- org.apache.commons.fileupload2.javax.JavaxServletRequestContext
-
- All Implemented Interfaces:
org.apache.commons.fileupload2.core.RequestContext
public class JavaxServletRequestContext extends org.apache.commons.fileupload2.core.AbstractRequestContext<javax.servlet.http.HttpServletRequest>
Provides access to the request information needed for a request made to an HTTP servlet.
-
-
Constructor Summary
Constructors Constructor Description JavaxServletRequestContext(javax.servlet.http.HttpServletRequest request)Constructs a context for this request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCharacterEncoding()Gets the character encoding for the request.java.lang.StringgetContentType()Gets the content type of the request.java.io.InputStreamgetInputStream()Gets the input stream for the request.-
Methods inherited from class org.apache.commons.fileupload2.core.AbstractRequestContext
getContentLength, getRequest, isMultipartRelated, toString
-
-
-
-
Constructor Detail
-
JavaxServletRequestContext
public JavaxServletRequestContext(javax.servlet.http.HttpServletRequest request)
Constructs a context for this request.- Parameters:
request- The request to which this context applies.
-
-
Method Detail
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
Gets the character encoding for the request.- Returns:
- The character encoding for the request.
-
getContentType
public java.lang.String getContentType()
Gets the content type of the request.- Returns:
- The content type of the request.
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Gets the input stream for the request.- Returns:
- The input stream for the request.
- Throws:
java.io.IOException- if a problem occurs.
-
-