Class ReplacedStringBodyRequestWrapper
java.lang.Object
javax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
com.atlassian.bamboo.plugins.rest.common.ReplacedStringBodyRequestWrapper
- All Implemented Interfaces:
Closeable
,AutoCloseable
,javax.servlet.http.HttpServletRequest
,javax.servlet.ServletRequest
public class ReplacedStringBodyRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
implements Closeable
Wraps request substituting original request body for given string. Content type and charset must be provided.
-
Field Summary
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
ConstructorDescriptionReplacedStringBodyRequestWrapper
(javax.servlet.http.HttpServletRequest request, String body, String contentType, Charset charset) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
getHeaders
(String name) javax.servlet.ServletInputStream
int
getIntHeader
(String name) Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHttpServletMapping, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade
Methods inherited from class javax.servlet.ServletRequestWrapper
getAsyncContext, getAttribute, getAttributeNames, getContentLengthLong, 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, startAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.servlet.ServletRequest
getAsyncContext, getAttribute, getAttributeNames, getContentLengthLong, 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, startAsync
-
Constructor Details
-
ReplacedStringBodyRequestWrapper
-
-
Method Details
-
getContentLength
public int getContentLength()- Specified by:
getContentLength
in interfacejavax.servlet.ServletRequest
- Overrides:
getContentLength
in classjavax.servlet.ServletRequestWrapper
-
getContentType
- Specified by:
getContentType
in interfacejavax.servlet.ServletRequest
- Overrides:
getContentType
in classjavax.servlet.ServletRequestWrapper
-
getHeader
- Specified by:
getHeader
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getHeader
in classjavax.servlet.http.HttpServletRequestWrapper
-
getHeaders
- Specified by:
getHeaders
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getHeaders
in classjavax.servlet.http.HttpServletRequestWrapper
-
getHeaderNames
- Specified by:
getHeaderNames
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getHeaderNames
in classjavax.servlet.http.HttpServletRequestWrapper
-
getIntHeader
- Specified by:
getIntHeader
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getIntHeader
in classjavax.servlet.http.HttpServletRequestWrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfacejavax.servlet.ServletRequest
- Overrides:
getCharacterEncoding
in classjavax.servlet.ServletRequestWrapper
-
getReader
- Specified by:
getReader
in interfacejavax.servlet.ServletRequest
- Overrides:
getReader
in classjavax.servlet.ServletRequestWrapper
- Throws:
IOException
-
getInputStream
- Specified by:
getInputStream
in interfacejavax.servlet.ServletRequest
- Overrides:
getInputStream
in classjavax.servlet.ServletRequestWrapper
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-