本帖最后由 一个铃,一颗珠 于 2013-9-3 17:30 编辑
RandomAccessFile randomAccessFile = new RandomAccessFile("f:/ran.txt","r");
randomAccessFile.seek(8*2);
int n=0;
byte[] bufs = new byte[4];
randomAccessFile.read(bufs);
String name = new String(bufs);
System.out.println(name);
int age = randomAccessFile.readInt();
System.out.println(age);
randomAccessFile.seek(8*2); 这个seek方法什么时候用
|