⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpservletresponseimpl.java

📁 This a java example
💻 JAVA
字号:
package javax.servlet.http.impl;

import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2003-4-9
 * Time: 22:39:34
 * To change this template use Options | File Templates.
 */
import java.io.*;
public class HttpServletResponseImpl implements HttpServletResponse {
    private OutputStream os;
    private String contentType;
    public void setOutputStream(OutputStream os){
        this.os=os;
    }
    public OutputStream getOutputStream()
            throws IOException {
        return new BufferedOutputStream(os);
    }

    public PrintWriter getWriter()
            throws IOException {
        return new PrintWriter(new OutputStreamWriter(os));
    }

    public void setContentType(String type) {
        this.contentType = type;
    }

    public String getContentType(){
        return contentType;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -