All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.featherfly.web.servlet.HttpServletResponseWrapper Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package cn.featherfly.web.servlet;

import java.io.PrintWriter;
import java.io.StringWriter;

import javax.servlet.http.HttpServletResponse;

/**
 * 

* HttpServletResponseWrapper的包装类. * 用于将HttpServletResponse的getWriter方法返回的PrintWriter替换为 * 使用构造方法传入的StringWriter的创建的包装类StringPrintWriter *

* * @author 钟冀 */ public class HttpServletResponseWrapper extends javax.servlet.http.HttpServletResponseWrapper{ private StringPrintWriter pw; public HttpServletResponseWrapper(HttpServletResponse response,StringWriter sw){ super(response); this.pw = new StringPrintWriter(sw); } /** * {@inheritDoc} */ @Override public PrintWriter getWriter(){ return pw; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy