Question
When I use ContentCachingResponseWrapper, the response data is not written to the original output stream. Shouldn’t the data be written to the original output stream while being written to the cache?
private class ResponseServletOutputStream extends ServletOutputStream {
private final ServletOutputStream os;
public ResponseServletOutputStream(ServletOutputStream os) {
this.os = os;
}
@Override
public void write(int b) throws IOException {
// os.write(b);
content.write(b);
}
@Override
public void write(byte[] b, int off, int len) throws IOException {
// os.write(b, off, len);
content.write(b, off, len);
}
// ...
}
Question