public class ResettableRequestServletWrapper
extends javax.servlet.http.HttpServletRequestWrapper
HttpServletRequestWrapper those ServletInputStream is
cached and can be reset and read again as often as necessary.| Modifier and Type | Method and Description |
|---|---|
int |
getContentLength() |
long |
getContentLengthLong() |
javax.servlet.ServletInputStream |
getInputStream() |
BufferedReader |
getReader() |
void |
resetInputStream()
In case the original input stream has been read, the
ServletInputStream will
be rewind to its beginning so it can be read again. |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic void resetInputStream()
ServletInputStream will
be rewind to its beginning so it can be read again.
Additionally the getReader() will be removed if it was used. It will be
created again on its next usage. If the original stream has been exhausted the
content length will be set as well.
To reset the input stream it is not necessary to exhaust it beforehand.
public javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream in interface javax.servlet.ServletRequestgetInputStream in class javax.servlet.ServletRequestWrapperIOExceptionpublic BufferedReader getReader() throws IOException
getReader in interface javax.servlet.ServletRequestgetReader in class javax.servlet.ServletRequestWrapperIOExceptionpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestgetContentLength in class javax.servlet.ServletRequestWrapperpublic long getContentLengthLong()
getContentLengthLong in interface javax.servlet.ServletRequestgetContentLengthLong in class javax.servlet.ServletRequestWrapperCopyright © 2016–2022 Atlassian. All rights reserved.