open class ContentCachingResponseWrapper : HttpServletResponseWrapper
javax.servlet.http.HttpServletResponse wrapper that caches all content written to the output stream and writer, and allows this content to be retrieved via a byte array
.
Used e.g. by org.springframework.web.filter.ShallowEtagHeaderFilter. Note: As of Spring Framework 5.0, this wrapper is built on the Servlet 3.1 API.
Author
Juergen Hoeller
Since
4.1.3
See Also
ContentCachingRequestWrapper
ContentCachingResponseWrapper(response: HttpServletResponse)
Create a new ContentCachingResponseWrapper for the given servlet response. |
open fun copyBodyToResponse(): Unit
Copy the complete cached body content to the response. |
|
open fun flushBuffer(): Unit |
|
open fun getContentAsByteArray(): ByteArray
Return the cached response content as a byte array. |
|
open fun getContentInputStream(): InputStream
Return an InputStream to the cached content. |
|
open fun getContentSize(): Int
Return the current size of the cached content. |
|
open fun getOutputStream(): ServletOutputStream |
|
open fun getStatusCode(): Int
Return the status code as specified on the response. |
|
open fun getWriter(): PrintWriter |
|
open fun reset(): Unit |
|
open fun resetBuffer(): Unit |
|
open fun sendError(sc: Int): Unit open fun sendError(sc: Int, msg: String): Unit |
|
open fun sendRedirect(location: String): Unit |
|
open fun setBufferSize(size: Int): Unit |
|
open fun setContentLength(len: Int): Unit |
|
open fun setContentLengthLong(len: Long): Unit |
|
open fun setStatus(sc: Int): Unit open fun setStatus(sc: Int, sm: String): Unit |