read bigfile
来源:互联网 发布:br软件怎么用 编辑:程序博客网 时间:2024/05/16 04:38
public List<String[]> readBigFile(String filePath)
{
List<String[]> object = new ArrayList<String[]>();
int bufSize = 1024;
byte[] bs = new byte[bufSize];
ByteBuffer byteBuf = ByteBuffer.allocate(1024);
FileChannel channel;
try
{
channel = new RandomAccessFile(filePath, "r").getChannel();
while (channel.read(byteBuf) != -1)
{
int size = byteBuf.position();
byteBuf.rewind();
byteBuf.get(bs);
// 把文件当字符串处理
String str = new String(bs, 0, size);
String[] strList = str.split(",");
// 可以写一个解析方法decode() or parser(),把数组的值对应放到对象里。
byteBuf.clear();
object.add(strList);
}
}
catch (Exception e)
{
e.printStackTrace();
}
return object;
}
- read bigfile
- Oracle-Bigfile and Smallfile
- 学习bigfile的记录
- 关于bigfile表空间
- BigFile和SmallFile表空间技术
- read()
- read ()
- read
- read
- read
- read()
- read
- read
- read
- read()
- Read
- read
- read
- 使用UITableView实现树视图
- C++程序设计实验报告(十一)
- linux 中解析命令行参数 (getopt_long用法)【转自:ast_224】
- MySQL性能优化的最佳21条经验
- C++程序设计实验报告(十二)
- read bigfile
- 2012活着真好
- Java UCT日期格式转换为CST格式
- recovery.img与boot.img对比分析
- C++程序设计实验报告(十三)
- MySQL数据入库时特殊字符处理
- 有用的博客
- 动态规划——LIS问题
- C++程序设计实验报告(十四)