Package sk.antons.web.filter.util
Class ServletRequestWrapper
- java.lang.Object
-
- sk.antons.web.filter.util.ServletRequestWrapper
-
- All Implemented Interfaces:
javax.servlet.ServletRequest
- Direct Known Subclasses:
HttpServletRequestWrapper
public class ServletRequestWrapper extends Object implements javax.servlet.ServletRequest
Helper class for wrapping HttpServletRequest instances. It enable to read request content two more than once.- Author:
- antons
-
-
Constructor Summary
Constructors Constructor Description ServletRequestWrapper(javax.servlet.ServletRequest request)
-
Method Summary
-
-
-
Method Detail
-
getAttribute
public Object getAttribute(String string)
- Specified by:
getAttributein interfacejavax.servlet.ServletRequest
-
getAttributeNames
public Enumeration getAttributeNames()
- Specified by:
getAttributeNamesin interfacejavax.servlet.ServletRequest
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfacejavax.servlet.ServletRequest
-
setCharacterEncoding
public void setCharacterEncoding(String string) throws UnsupportedEncodingException
- Specified by:
setCharacterEncodingin interfacejavax.servlet.ServletRequest- Throws:
UnsupportedEncodingException
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin interfacejavax.servlet.ServletRequest
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfacejavax.servlet.ServletRequest
-
getInputStream
public javax.servlet.ServletInputStream getInputStream() throws IOException- Specified by:
getInputStreamin interfacejavax.servlet.ServletRequest- Throws:
IOException
-
getParameter
public String getParameter(String string)
- Specified by:
getParameterin interfacejavax.servlet.ServletRequest
-
getParameterNames
public Enumeration getParameterNames()
- Specified by:
getParameterNamesin interfacejavax.servlet.ServletRequest
-
getParameterValues
public String[] getParameterValues(String string)
- Specified by:
getParameterValuesin interfacejavax.servlet.ServletRequest
-
getParameterMap
public Map getParameterMap()
- Specified by:
getParameterMapin interfacejavax.servlet.ServletRequest
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfacejavax.servlet.ServletRequest
-
getScheme
public String getScheme()
- Specified by:
getSchemein interfacejavax.servlet.ServletRequest
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfacejavax.servlet.ServletRequest
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfacejavax.servlet.ServletRequest
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReaderin interfacejavax.servlet.ServletRequest- Throws:
IOException
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfacejavax.servlet.ServletRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfacejavax.servlet.ServletRequest
-
setAttribute
public void setAttribute(String string, Object o)
- Specified by:
setAttributein interfacejavax.servlet.ServletRequest
-
removeAttribute
public void removeAttribute(String string)
- Specified by:
removeAttributein interfacejavax.servlet.ServletRequest
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfacejavax.servlet.ServletRequest
-
getLocales
public Enumeration getLocales()
- Specified by:
getLocalesin interfacejavax.servlet.ServletRequest
-
isSecure
public boolean isSecure()
- Specified by:
isSecurein interfacejavax.servlet.ServletRequest
-
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(String string)
- Specified by:
getRequestDispatcherin interfacejavax.servlet.ServletRequest
-
getRealPath
public String getRealPath(String string)
- Specified by:
getRealPathin interfacejavax.servlet.ServletRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePortin interfacejavax.servlet.ServletRequest
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfacejavax.servlet.ServletRequest
-
getLocalAddr
public String getLocalAddr()
- Specified by:
getLocalAddrin interfacejavax.servlet.ServletRequest
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPortin interfacejavax.servlet.ServletRequest
-
getContentLengthLong
public long getContentLengthLong()
- Specified by:
getContentLengthLongin interfacejavax.servlet.ServletRequest
-
getServletContext
public javax.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfacejavax.servlet.ServletRequest
-
startAsync
public javax.servlet.AsyncContext startAsync() throws IllegalStateException- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest- Throws:
IllegalStateException
-
startAsync
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws IllegalStateException- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()
- Specified by:
isAsyncStartedin interfacejavax.servlet.ServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()
- Specified by:
isAsyncSupportedin interfacejavax.servlet.ServletRequest
-
getAsyncContext
public javax.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContextin interfacejavax.servlet.ServletRequest
-
getDispatcherType
public javax.servlet.DispatcherType getDispatcherType()
- Specified by:
getDispatcherTypein interfacejavax.servlet.ServletRequest
-
-