RandomAccessFile流用法
即可读也可写
RandomAccessFile raf = new RandomAccessFile(getFileName(path), "rw"); //raf.write(97); //int x =raf.read();
方法2个
raf.seek(startIndex);//每个线程写文件的开始位置都是不一样的. raf.setLengthlong newLength);//设置大小
即可读也可写
RandomAccessFile raf = new RandomAccessFile(getFileName(path), "rw");
//raf.write(97);
//int x =raf.read();
方法2个
raf.seek(startIndex);//每个线程写文件的开始位置都是不一样的.
raf.setLengthlong newLength);//设置大小