public class RequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
| 限定符和类型 | 字段和说明 |
|---|---|
private byte[] |
body
存储body数据的容器
|
| 构造器和说明 |
|---|
RequestWrapper(javax.servlet.http.HttpServletRequest request) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getBodyString()
获取请求Body
|
String |
getBodyString(javax.servlet.ServletRequest request)
获取请求Body
|
javax.servlet.ServletInputStream |
getInputStream() |
BufferedReader |
getReader() |
private String |
inputStream2String(InputStream inputStream)
将inputStream里的数据读取出来并转换成字符串
|
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, getContentLength, getContentLengthLong, 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, getContentLength, getContentLengthLong, 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 RequestWrapper(javax.servlet.http.HttpServletRequest request)
throws IOException
IOExceptionpublic String getBodyString(javax.servlet.ServletRequest request)
request - requestpublic String getBodyString()
private String inputStream2String(InputStream inputStream)
inputStream - inputStreampublic BufferedReader getReader() throws IOException
getReader 在接口中 javax.servlet.ServletRequestgetReader 在类中 javax.servlet.ServletRequestWrapperIOExceptionpublic javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream 在接口中 javax.servlet.ServletRequestgetInputStream 在类中 javax.servlet.ServletRequestWrapperIOExceptionCopyright © 2019. All rights reserved.