// to both the original response and the cache output stream.
try {
if (tx == null || tx.getFilter() == null)
out = new PrintWriter(new OutputStreamWriter(super.getOutputStream(), encoding));
else
out = new PrintWriter(new BufferedWriter(new FilterWriter(new OutputStreamWriter(new TeeOutputStream(super.getOutputStream(), tx.getOutputStream()), encoding), tx.getFilter(), contentType)));
} catch (UnsupportedEncodingException e) {
throw new IOException(e.getMessage());
}
// Check whether the new writer is usable