西安邮电大学《分布式计算原理及应用》实验报(5)
发布时间:2021-06-05
发布时间:2021-06-05
e.printStackTrace();
continue;
}
}
}
}
2、 当接收到请求之后,开启线程处理请求;
package http;
import java.io.InputStream;
import java.io.IOException;
public class Request {
private InputStream input;
private String uri;
public Request(InputStream input) {
new InputtoFilr().saveinFile();
this.input = input;
}
public void parse() {
// Read a set of characters from the socket
StringBuffer request = new StringBuffer(2048);
int i;
byte[] buffer = new byte[2048];
try {
i = input.read(buffer);
上一篇:冀人发〔2007〕70号遗属