写入大文件(>2G)
FileChannel rwChannel =new RandomAccessFile(reportFilePath + reportFileName
+ generaFileDate + ".TXT", "rw").getChannel();
byte[] a = sb.toString().getBytes();
ByteBuffer wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE,POSITION, a.length);
POSITION = POSITION+a.length;
wrBuf.put(a);
一次写入100,000条数据,笔记本正常(1.GJVM,Jrockit),服务器(4G JVM IBM JDK1.6.0)outofmemory
IBM官网Bug记录:http://www-01.ibm.com/support/docview.wss?uid=swg1IV34570
求不坑。