InputStream转成String
来源:互联网 发布:php http 异步请求 编辑:程序博客网 时间:2024/05/18 20:10
InputStream inputStream = new FileInputStream(file);
InputStreamReader reader = new InputStreamReader(
inputStream, "UTF-8");
BufferedReader br = new BufferedReader(reader);
String data = "";
StringBuffer sb = new StringBuffer();
while ((data = br.readLine()) != null) {
sb.append(data);
}
String xml = sb.toString();
Log.e("----",xml);
inputStream.close();
InputStreamReader reader = new InputStreamReader(
inputStream, "UTF-8");
BufferedReader br = new BufferedReader(reader);
String data = "";
StringBuffer sb = new StringBuffer();
while ((data = br.readLine()) != null) {
sb.append(data);
}
String xml = sb.toString();
Log.e("----",xml);
inputStream.close();
- InputStream转成String
- 如何将InputStream转成String
- 如何将String转成InputStream
- 如何将String转成InputStream
- 如何将String转成InputStream .
- 巧用Scanner将InputStream转成String
- 将InputStream(输入流)转成String 的方法
- String类型变量转成InputStream或者Reader流类型,用于sax解析的输入,转成InputStream时中文乱码,转成Reader流就好了
- InputStream & String
- Request.InputStream 转成byte[]数组
- String转InputStream和InputStream转String
- String 和 InputStream 转化
- String之间转换InputStream
- android InputStream 转 String
- String和InputStream转换
- string转化为inputstream
- String与InputStream互转
- InputStream转化为String
- lisp format总结
- ubuntu 12.04 安装java6
- php获得图像的属性函数
- Java位操作大全(通用于C语言)
- 【PB】如何发布独立的POWERBUILDER应用
- InputStream转成String
- VC实现下屏蔽Ctrl+Alt+Del键
- 银行业务系统设计特点概述
- 网络编程_TCP协议的文件上传
- The connection to adb is down, and a severe error has occured
- mysqldump 数据备份
- 800个有趣句子帮你记忆7000个单词
- 【OSC手机App技术解析】- 气泡对话列表
- 图解深度优先搜索