解析json
来源:互联网 发布:查看淘宝产品价格变化 编辑:程序博客网 时间:2024/06/09 22:09
/*按字节读取字符串*/
/* 个人感觉最好的方式,(一次读完)读字节就读字节吧,读完转码一次不就好了*/
private
static
String readString3()
{
String str=
""
;
File file=
new
File(FILE_IN);
try
{
FileInputStream in=
new
FileInputStream(file);
// size 为字串的长度 ,这里一次性读完
int
size=in.available();
byte
[] buffer=
new
byte
[size];
in.read(buffer);
in.close();
str=
new
String(buffer,
"GB2312"
);
}
catch
(IOException e) {
// TODO Auto-generated catch block
return
null
;
e.printStackTrace();
}
return
str;
}
阅读全文
0 0
- 【JSON解析】JSON解析
- 解析JSON
- Json解析
- JSON解析
- JSON解析
- json解析
- Json解析
- Json解析
- JSON解析
- Json解析
- Json解析
- JSON解析
- JSON解析
- json 解析
- Json解析
- JSON解析
- json解析
- json 解析
- VM8下ubuntu10.04下修改mac地址和配置静态ip
- MyBatista_log4j
- 对Python、shell的一些思考
- HashMap实现原理及源码分析
- java开发环境配置
- 解析json
- B
- POJ3177 Redundant Paths —— 边双联通分量 + 缩点
- Docker学习总结——从零开始搭建Jenkins+Docker自动化集成环境
- Scrapy安装错误:Microsoft Visual C++ 14.0 is required
- test
- IIIT5K数据提取预处理
- POJ 2533 最长上升子序列
- 浏览器默认样式清除