package pk2;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.Socket;
public class Response {
private BufferedWriter bw;
//正文
private StringBuilder content;
//协议头信息(状态行与请求头,回车)
private StringBuilder headinfo;
private int len;
public Response() {
content=new StringBuilder();
headinfo=new StringBuilder();
len=0;
}
public Response(Socket client){
this();
try {
bw=new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
} catch (IOException e) {
e.printStackTrace();
}
}
public Response(OutputStream out){
bw=new BufferedWriter(new OutputStreamWriter(out));
}
}
this();