Class ServletRequestContext
- java.lang.Object
-
- com.helger.web.fileupload.servlet.ServletRequestContext
-
- All Implemented Interfaces:
IRequestContext
public class ServletRequestContext extends Object implements IRequestContext
Provides access to the request information needed for a request made to an HTTP servlet.
- Since:
- FileUpload 1.1
- Version:
- $Id: ServletRequestContext.java 479262 2006-11-26 03:09:24Z niallp $
- Author:
- Martin Cooper
-
-
Constructor Summary
Constructors Constructor Description ServletRequestContext(jakarta.servlet.http.HttpServletRequest aHttpRequest)Construct a context for this request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCharacterEncoding()Retrieve the character encoding for the request.longgetContentLength()Retrieve the content length of the request.StringgetContentType()Retrieve the content type of the request.jakarta.servlet.ServletInputStreamgetInputStream()Retrieve the input stream for the request.StringtoString()
-
-
-
Constructor Detail
-
ServletRequestContext
public ServletRequestContext(@Nonnull jakarta.servlet.http.HttpServletRequest aHttpRequest)
Construct a context for this request.- Parameters:
aHttpRequest- The request to which this context applies. May not benull.
-
-
Method Detail
-
getCharacterEncoding
@Nullable public String getCharacterEncoding()
Description copied from interface:IRequestContextRetrieve the character encoding for the request.- Specified by:
getCharacterEncodingin interfaceIRequestContext- Returns:
- The character encoding for the request.
-
getContentType
@Nullable public String getContentType()
Description copied from interface:IRequestContextRetrieve the content type of the request.- Specified by:
getContentTypein interfaceIRequestContext- Returns:
- The content type of the request.
-
getContentLength
@CheckForSigned public long getContentLength()
Description copied from interface:IRequestContextRetrieve the content length of the request.- Specified by:
getContentLengthin interfaceIRequestContext- Returns:
- The content length of the request. My be -1 to indicate an unknown content length.
-
getInputStream
@Nonnull public jakarta.servlet.ServletInputStream getInputStream() throws IOException
Description copied from interface:IRequestContextRetrieve the input stream for the request.- Specified by:
getInputStreamin interfaceIRequestContext- Returns:
- The input stream for the request.
- Throws:
IOException- if a problem occurs.
-
-