<!--教程正文文字开始-->
用socket发送xml文档,把生成的xml文档转化成字符流输出
Socket c = new Socket(host,port) PrintWriter pw = new PrintWriter(new OutuputStreamWriter(c.getOutputStream()),true); File f = new File(xml); BufferedReader br = new BufferedReader(new FileReader(f)); String line; while((line = br.readLine()) != null) pw.println(line); pw.close(); br.close(); |
用socket发送xml文档
最新推荐文章于 2021-03-18 01:10:45 发布