public void run() {
        try {
            //NGXg̉
            ByteArrayOutputStream baos = null;
            short host_port = 80;
            String host = null;
            byte[] req_data = null;
            baos = new ByteArrayOutputStream(1024);
            String str;
            char[] str_c;
            int line = 0;
            int content_length = -1;
            boolean connection_changed = false;
            do {
                str = TextIn.readLine();
                if (str == null) {
                    break;
                }
                str_c = str.toLowerCase().toCharArray();
                if (line == 0) {
                    int start = str.indexOf(HTTP_URL_START);
                    int host_start = start + HTTP_URL_START.length();
                    int end = str.indexOf("/", host_start);
                    int pt_start;
                    //zXgƃf[^̏
                    host = str.substring(host_start, end);
                    if ((pt_start = host.indexOf(":")) >= 0) {
                        String port_str = host.substring(pt_start + 1);
                        host_port = Short.parseShort(port_str);
                        host = host.substring(0, pt_start);
                    }
                    str = str.substring(0, start) + str.substring(end);
                } else if (content_length < 0 &&
                           Request.strcmp_start(str_c, CONTNT_LENGTH_HEADER_C)) {
                    content_length = Integer.valueOf(str.substring(
                            CONTNT_LENGTH_HEADER.length()));
                } else if (!connection_changed && Request.strcmp_start(str_c,
                                                PROXY_CONNECTION_HEADER_C)) {
                    str = CONNECTION_HEADER;
                    connection_changed = true;
                } else if (
                        Request.strcmp_start(str_c, KEEP_ALIVE_HEADER_C) ||
                        Request.strcmp_start(str_c, CHACHE_HEADER_C)) {
                    continue;
                }
                baos.write(str.getBytes());
                baos.write("\r\n".getBytes());
                line++;
            } while (!(str_c.length == 0));
            //f[^̎M
            int total_size = 0;
            int size;
            while (total_size < content_length &&
                   (size = DataIn.read(Buffer, 0, Request.BUFF_SIZE)) > 0) {
                baos.write(Buffer, 0, size);
                total_size += size;
            }
            baos.flush();
            req_data = baos.toByteArray();
            baos.close();
            ClientSocket.shutdownInput();
            //v̒ǉ
            Request req = new Request(LoginInfo,
                                      ServerCommunicator.ACTION_REQUEST,
                                      host_port, host, req_data);
            ReqQueue.offer(req);
            //ʂԂ
            if (req.getConnected() && req.getReceived()) {
                if (req.getResultCode() != ServerCommunicator.ACTION_RESULT) {
                    TextOut.write("Kicked.");
                    TextOut.flush();
                } else {
                    InputStream res_dis = req.getRecvInputStream();
                    try {
                        byte[] data = new byte[Request.BUFF_SIZE];
                        int in;
                        while ((in = res_dis.read(data, 0,
                                                  Request.BUFF_SIZE)) > 0) {
                            DataOut.write(data, 0, in);
                        }
                        DataOut.flush();
                    } finally {
                        req.cancel();
                        res_dis.close();
                        ClientSocket.shutdownOutput();
                    }
                }
            }
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try { //\Pbg
                TextIn.close();
                DataIn.close();
                DataOut.close();
                TextOut.close();
                ClientSocket.close();
            } catch (IOException ex1) {
                ex1.printStackTrace();
            }
            //Z}tHԂ
            Sem.release();
        }
    }