Class ServletRequestContext
- java.lang.Object
- 
- org.apache.tomcat.util.http.fileupload.servlet.ServletRequestContext
 
- 
- All Implemented Interfaces:
- RequestContext,- UploadContext
 
 public class ServletRequestContext extends java.lang.Object implements UploadContext Provides access to the request information needed for a request made to an HTTP servlet. - Since:
- FileUpload 1.1
 
- 
- 
Constructor SummaryConstructors Constructor Description ServletRequestContext(HttpServletRequest request)Construct a context for this request.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longcontentLength()Retrieve the content length of the request.java.lang.StringgetCharacterEncoding()Retrieve the character encoding for the request.java.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.
 
- 
- 
- 
Constructor Detail- 
ServletRequestContextpublic ServletRequestContext(HttpServletRequest request) Construct a context for this request.- Parameters:
- request- The request to which this context applies.
 
 
- 
 - 
Method Detail- 
getCharacterEncodingpublic java.lang.String getCharacterEncoding() Retrieve the character encoding for the request.- Specified by:
- getCharacterEncodingin interface- RequestContext
- Returns:
- The character encoding for the request.
 
 - 
getContentTypepublic java.lang.String getContentType() Retrieve the content type of the request.- Specified by:
- getContentTypein interface- RequestContext
- Returns:
- The content type of the request.
 
 - 
contentLengthpublic long contentLength() Retrieve the content length of the request.- Specified by:
- contentLengthin interface- UploadContext
- Returns:
- The content length of the request.
- Since:
- 1.3
 
 - 
getInputStreampublic java.io.InputStream getInputStream() throws java.io.IOExceptionRetrieve the input stream for the request.- Specified by:
- getInputStreamin interface- RequestContext
- Returns:
- The input stream for the request.
- Throws:
- java.io.IOException- if a problem occurs.
 
 - 
toStringpublic java.lang.String toString() Returns a string representation of this object.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- a string representation of this object.
 
 
- 
 
-