private static class ShallowEtagHeaderFilter.ShallowEtagResponseWrapper
extends HttpServletResponseWrapper
HttpServletRequest
wrapper that buffers all content written to the
output stream and writer,
and allows this content to be retrieved via a byte array
.Modifier and Type | Class and Description |
---|---|
private class |
ShallowEtagHeaderFilter.ShallowEtagResponseWrapper.ResponsePrintWriter |
private class |
ShallowEtagHeaderFilter.ShallowEtagResponseWrapper.ResponseServletOutputStream |
Modifier and Type | Field and Description |
---|---|
private ResizableByteArrayOutputStream |
content |
private ServletOutputStream |
outputStream |
private int |
statusCode |
private java.io.PrintWriter |
writer |
Constructor and Description |
---|
ShallowEtagResponseWrapper(HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
private void |
copyBodyToResponse() |
ServletOutputStream |
getOutputStream() |
int |
getStatusCode() |
java.io.PrintWriter |
getWriter() |
void |
reset() |
void |
resetBuffer() |
void |
sendError(int sc) |
void |
sendError(int sc,
java.lang.String msg) |
void |
sendRedirect(java.lang.String location) |
void |
setBufferSize(int size) |
void |
setContentLength(int len) |
void |
setStatus(int sc) |
void |
setStatus(int sc,
java.lang.String sm) |
byte[] |
toByteArray() |
private final ResizableByteArrayOutputStream content
private final ServletOutputStream outputStream
private java.io.PrintWriter writer
private int statusCode
public ShallowEtagResponseWrapper(HttpServletResponse response)
public void setStatus(int sc)
public void setStatus(int sc, java.lang.String sm)
public void sendError(int sc) throws java.io.IOException
java.io.IOException
public void sendError(int sc, java.lang.String msg) throws java.io.IOException
java.io.IOException
public void sendRedirect(java.lang.String location) throws java.io.IOException
java.io.IOException
public ServletOutputStream getOutputStream()
public java.io.PrintWriter getWriter() throws java.io.IOException
java.io.IOException
public void setContentLength(int len)
public void setBufferSize(int size)
public void resetBuffer()
public void reset()
public int getStatusCode()
public byte[] toByteArray()
private void copyBodyToResponse() throws java.io.IOException
java.io.IOException