public class ServletRequestContext extends Object implements IRequestContext
Provides access to the request information needed for a request made to an HTTP servlet.
| Constructor and Description |
|---|
ServletRequestContext(javax.servlet.http.HttpServletRequest aHttpRequest)
Construct a context for this request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCharacterEncoding()
Retrieve the character encoding for the request.
|
long |
getContentLength()
Retrieve the content length of the request.
|
String |
getContentType()
Retrieve the content type of the request.
|
javax.servlet.ServletInputStream |
getInputStream()
Retrieve the input stream for the request.
|
String |
toString() |
public ServletRequestContext(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest)
aHttpRequest - The request to which this context applies. May not be
null.@Nullable public String getCharacterEncoding()
IRequestContextgetCharacterEncoding in interface IRequestContext@Nullable public String getContentType()
IRequestContextgetContentType in interface IRequestContext@CheckForSigned public long getContentLength()
IRequestContextgetContentLength in interface IRequestContext@Nonnull public javax.servlet.ServletInputStream getInputStream() throws IOException
IRequestContextgetInputStream in interface IRequestContextIOException - if a problem occurs.Copyright © 2014–2019 Philip Helger. All rights reserved.