public class HttpServletRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
HttpServletRequestWrapper.getReader(), HttpServletRequestWrapper.getInputStream() and any of the getParameterXXX to be called
safely and repeatedly with the same results.
This class is intended to wrap relatively small HttpServletRequest instances.| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
HttpServletRequestWrapper() |
HttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBodyBufferingTimeNs()
Time taken to buffer the request body in nanoseconds.
|
byte[] |
getContentData()
This method is safe to use multiple times.
|
javax.servlet.ServletInputStream |
getInputStream()
This method is safe to call multiple times.
|
java.lang.String |
getParameter(java.lang.String name)
This method is safe to execute multiple times.
|
java.util.Map |
getParameterMap()
This method is safe.
|
java.util.Enumeration |
getParameterNames()
This method is safe to execute multiple times.
|
java.util.HashMap<java.lang.String,java.lang.String[]> |
getParameters()
This method is safe to use multiple times.
|
java.lang.String[] |
getParameterValues(java.lang.String name)
This method is safe to execute multiple times.
|
java.io.BufferedReader |
getReader()
This method is safe to call multiple times.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the wrapped HttpServletRequest.
|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRolegetAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncodingpublic HttpServletRequestWrapper()
public HttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
public javax.servlet.http.HttpServletRequest getRequest()
getRequest in class javax.servlet.ServletRequestWrapperpublic byte[] getContentData()
public java.util.HashMap<java.lang.String,java.lang.String[]> getParameters()
public long getBodyBufferingTimeNs()
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.ServletRequestgetInputStream in class javax.servlet.ServletRequestWrapperjava.io.IOExceptionpublic java.io.BufferedReader getReader()
throws java.io.IOException
getReader in interface javax.servlet.ServletRequestgetReader in class javax.servlet.ServletRequestWrapperjava.io.IOExceptionpublic java.lang.String getParameter(java.lang.String name)
getParameter in interface javax.servlet.ServletRequestgetParameter in class javax.servlet.ServletRequestWrapperServletRequest.getParameter(java.lang.String)public java.util.Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestgetParameterMap in class javax.servlet.ServletRequestWrapper#getParameters()},
ServletRequest.getParameterMap()public java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestgetParameterNames in class javax.servlet.ServletRequestWrapperServletRequest.getParameterNames()public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface javax.servlet.ServletRequestgetParameterValues in class javax.servlet.ServletRequestWrapperServletRequest.getParameterValues(java.lang.String)