java.lang.Object
jakarta.servlet.ServletResponseWrapper
- All Implemented Interfaces:
ServletResponse
- Direct Known Subclasses:
HttpServletResponseWrapper
The ServletResponseWrapper API.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Flush the buffer.int
Returns the buffer size.Returns the character encoding.Returns the content type.Returns the locale.Get the output stream.Returns the wrapped response.Get the writer.boolean
Is committed.boolean
isWrapperFor(ServletResponse wrapped)
Is wrapper for.boolean
isWrapperFor(Class<?> wrappedType)
Is wrapper for.void
reset()
Reset.void
Reset the buffer.void
setBufferSize(int bufferSize)
Set the buffer size.void
setCharacterEncoding(String characterEncoding)
Set the character encoding.void
setContentLength(int contentLength)
Set the content length.void
setContentLengthLong(long contentLength)
Set the content length.void
setContentType(String contentType)
Set the content type.void
Set the locale.void
setResponse(ServletResponse wrapped)
Set the wrapped response.
-
Constructor Details
-
ServletResponseWrapper
Constructor.- Parameters:
wrapped
- the wrapped response.
-
-
Method Details
-
flushBuffer
Flush the buffer.- Specified by:
flushBuffer
in interfaceServletResponse
- Throws:
IOException
- when an I/O error occurs.
-
getBufferSize
public int getBufferSize()Returns the buffer size.- Specified by:
getBufferSize
in interfaceServletResponse
- Returns:
- the buffer size
-
getCharacterEncoding
Returns the character encoding.- Specified by:
getCharacterEncoding
in interfaceServletResponse
- Returns:
- the character encoding
-
getContentType
Returns the content type.- Specified by:
getContentType
in interfaceServletResponse
- Returns:
- the content type
-
getLocale
Returns the locale.- Specified by:
getLocale
in interfaceServletResponse
- Returns:
- the locale
-
getOutputStream
Get the output stream.- Specified by:
getOutputStream
in interfaceServletResponse
- Returns:
- the output stream.
- Throws:
IOException
- when an I/O error occurs.
-
getResponse
Returns the wrapped response.- Returns:
- the wrapped response
-
getWriter
Get the writer.- Specified by:
getWriter
in interfaceServletResponse
- Returns:
- the writer.
- Throws:
IOException
- when an I/O error occurs.
-
isCommitted
public boolean isCommitted()Is committed.- Specified by:
isCommitted
in interfaceServletResponse
- Returns:
- true if it is, false otherwise.
-
isWrapperFor
Is wrapper for.- Parameters:
wrapped
- the wrapped response.- Returns:
- true if we wrap it, false otherwise.
-
isWrapperFor
Is wrapper for.- Parameters:
wrappedType
- the wrapped type.- Returns:
- true if we wrap it, false otherwise.
-
reset
public void reset()Reset.- Specified by:
reset
in interfaceServletResponse
-
resetBuffer
public void resetBuffer()Reset the buffer.- Specified by:
resetBuffer
in interfaceServletResponse
-
setBufferSize
public void setBufferSize(int bufferSize)Set the buffer size.- Specified by:
setBufferSize
in interfaceServletResponse
- Parameters:
bufferSize
- the buffer size.
-
setCharacterEncoding
Set the character encoding.- Specified by:
setCharacterEncoding
in interfaceServletResponse
- Parameters:
characterEncoding
- the character encoding.
-
setContentLength
public void setContentLength(int contentLength)Set the content length.- Specified by:
setContentLength
in interfaceServletResponse
- Parameters:
contentLength
- the content length.
-
setContentLengthLong
public void setContentLengthLong(long contentLength)Set the content length.- Specified by:
setContentLengthLong
in interfaceServletResponse
- Parameters:
contentLength
- the content length.
-
setContentType
Set the content type.- Specified by:
setContentType
in interfaceServletResponse
- Parameters:
contentType
- the content type.
-
setLocale
Set the locale.- Specified by:
setLocale
in interfaceServletResponse
- Parameters:
locale
- the locale.
-
setResponse
Set the wrapped response.- Parameters:
wrapped
- the wrapped response.
-