txt 下载换行代码-已测试

    xiaoxiao2021-12-14  18

    File file = new File("xxx/share.txt");                 InputStreamReader read = new InputStreamReader(new FileInputStream(file),"GBK");         BufferedReader readBuf = new BufferedReader(read);         String s = null;         os = response.getOutputStream();         byte[] c=new byte[2];         c[0]=0x0d;         c[1]=0x0a;         while((s=readBuf.readLine())!=null){         os.write(s.getBytes(), 0, s.getBytes().length);         os.write(c, 0, 2);             os.flush();          }         readBuf.close();         os.close(); txt内容 卡号,金额 001,0 2 3 1 21 2 1 2121
    转载请注明原文地址: https://ju.6miu.com/read-965164.html

    最新回复(0)