public class ServletRequestContext extends java.lang.Object implements UploadContext
Provides access to the request information needed for a request made to an HTTP servlet.
| Constructor and Description |
|---|
ServletRequestContext(javax.servlet.http.HttpServletRequest request)
Construct a context for this request.
|
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Retrieve the content length of the request.
|
java.lang.String |
getCharacterEncoding()
Retrieve the character encoding for the request.
|
int |
getContentLength()
Deprecated.
1.3 Use
contentLength() instead |
java.lang.String |
getContentType()
Retrieve the content type of the request.
|
java.io.InputStream |
getInputStream()
Retrieve the input stream for the request.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public ServletRequestContext(javax.servlet.http.HttpServletRequest request)
request - The request to which this context applies.public java.lang.String getCharacterEncoding()
getCharacterEncoding in interface RequestContextpublic java.lang.String getContentType()
getContentType in interface RequestContext@Deprecated public int getContentLength()
contentLength() insteadgetContentLength in interface RequestContextpublic long contentLength()
contentLength in interface UploadContextpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface RequestContextjava.io.IOException - if a problem occurs.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved