public void sendResponse(int state,BufferedInputStream bis,String fileType,String extra) throws IOException{
		//״̬ͷ
		
		String headers=HTTP.getHttpResponseHeader(state, MIME.getMIMEBySuffix(fileType));
		System.out.println("ӦͷϢӦ "+headers);
		if(bis==null){state=HTTP.HTTP_NOT_FOUND;}
		if(state==HTTP.HTTP_OK){
			byte[] buff=new byte[8080];//עĻ̫СĻ
			out.println("HTTP/1.1 200 OK");
			out.println(headers);
			out.println();
			while ((bis.read(buff)) != -1) {
				out.write(buff);
				System.out.println("ӦϢ "+new String(buff));
				out.flush();
				}
			bis.close();
			out.close();	
		}
		else if(state==HTTP.HTTP_NOT_FOUND){
		System.out.println("״̬404");
		out.println("HTTP/1.1 404 Not Found");
		out.println();
		out.write(Tools.getMsgByHttpState(state).getBytes());
		out.write((""+extra).getBytes());
		out.close();	
		}
	}