txt 下载换行代码-已测试
来源:互联网 发布:资本主义灭亡 知乎 编辑:程序博客网 时间:2024/04/29 08:36
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
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
0 0
- txt 下载换行代码-已测试
- 测试代码自动换行
- struts2 + velocity 下载word(已测试)
- 随机生成代码——已测试
- asp邮件发送代码,已测试
- (已测试)C# web下文件下载方法
- 换行代码
- 代码换行
- PHP 写入txt文件换行
- PHP 写入txt文件换行
- PHP写入txt文件换行
- PHP写入txt文件换行
- php写入txt文件换行
- PHP 写入txt文件换行
- java写.txt文件换行
- 数字倒数跳转的js代码(已测试通过)
- 二叉树的创建和遍历(附代码已测试)
- java版 仿qq代码 完整源码 (已测试)
- 青春是用来拼搏的,而不是用来挥霍的
- navicate 查看mysql中的blob字段中的值
- Android轮播控件 BGABanner
- OAuth认证授权流程
- URL编码解决中文乱码
- txt 下载换行代码-已测试
- linux 服务器加入域名解析
- java等程序在结合docker部署的时候
- 使用内容观察者(ContentObserver)来观察 蓝牙 打开和关闭的状态
- Base.css
- 数据库设计的满足的相关范式
- LINUX
- 利用ffmpeg提取视频中的图片
- memcache 基本使用-已测试