SOCKET 输入输出流

来源:互联网 发布:手机淘宝女装店铺公告 编辑:程序博客网 时间:2024/06/11 08:01
        InputStream input = socket_.getInputStream();byte buffer[] = new byte[1024 * 4];int temp = 0;String info = "";while ((temp = input.read(buffer)) != -1) {  info = new String(buffer, 0, temp);          //处理过程          OutputStream os = socket_.getOutputStream();  Result resutl = Utils.sendRequest(strHead, urlString, bodyString);  os.write((resutl.headerCode+"\t"+resutl.result).getBytes());  os.flush();        }


原创粉丝点击