// 设置HttpResponse的Header
httpRes.addAllHeader(header);
httpRes.setStatus(200);
byte[] resBody;
httpRes.setContentLength(resBody.length);
httpRes.write(resBody);
this.res.getOutputStream().write(data, begin, length);
this.res.getOutputStream().flush();
//异常
httpRes.sendError(500,"error");
httpRes.setReady();
this.res.sendError(status, statusText);
httpRes.addAllHeader(header);
httpRes.setStatus(200);
byte[] resBody;
httpRes.setContentLength(resBody.length);
httpRes.write(resBody);
this.res.getOutputStream().write(data, begin, length);
this.res.getOutputStream().flush();
//异常
httpRes.sendError(500,"error");
httpRes.setReady();
this.res.sendError(status, statusText);