此文件中大约有1千8百万的数据,我现在需要把次文件中的数据导入到oracle数据库中,本来是打算用sqlldr导入,但是此文件的前三行如下:
select * from test
mobile state
=======================
13500000001 0
.......................哪位高人教我如何处理
select * from test
mobile state
=======================
13500000001 0
.......................哪位高人教我如何处理
http://community.csdn.net/Expert/TopicView3.asp?id=5355433
java.io.IOException: 存储空间不足,无法处理此命令。代码:
String file = "E:\\话单\\cdr0121.txt";
RandomAccessFile raFile = new RandomAccessFile(file, "r");
FileChannel fc = raFile.getChannel();
long size = fc.size();
MappedByteBuffer mapBuf = fc.map(FileChannel.MapMode.READ_ONLY, 0, size);
ByteBuffer bb = mapBuf.asReadOnlyBuffer();错误在: MappedByteBuffer mapBuf = fc.map(FileChannel.MapMode.READ_ONLY, 0, size);
把参数errors设定成3不就可以了!
大文件就不要用文件读写类了
用流
java.io.FileStream
-- java.io.FileOutputStream用流把前3行去掉就是了