Class ServletRequestContext
java.lang.Object
org.apache.tomcat.util.http.fileupload.servlet.ServletRequestContext
- All Implemented Interfaces:
- RequestContext,- UploadContext
Provides access to the request information needed for a request made to an HTTP servlet.
- Since:
- FileUpload 1.1
- 
Constructor SummaryConstructorsConstructorDescriptionServletRequestContext(HttpServletRequest request) Construct a context for this request.
- 
Method SummaryModifier and TypeMethodDescriptionlongRetrieve the content length of the request.Retrieve the character encoding for the request.Retrieve the content type of the request.Retrieve the input stream for the request.toString()Returns a string representation of this object.
- 
Constructor Details- 
ServletRequestContextConstruct a context for this request.- Parameters:
- request- The request to which this context applies.
 
 
- 
- 
Method Details- 
getCharacterEncodingRetrieve the character encoding for the request.- Specified by:
- getCharacterEncodingin interface- RequestContext
- Returns:
- The character encoding for the request.
 
- 
getContentTypeRetrieve 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
 
- 
getInputStreamRetrieve the input stream for the request.- Specified by:
- getInputStreamin interface- RequestContext
- Returns:
- The input stream for the request.
- Throws:
- IOException- if a problem occurs.
 
- 
toStringReturns a string representation of this object.
 
-