File f = new File("d:"+File.separator+"1.txt");
System.out.println("d:"+File.separator+"1.txt");
RandomAccessFile rdf = null;
rdf = new RandomAccessFile(f,"rw");
String name=null;
int age = 0;
name="zhangsan";
age= 30;
rdf.writeBytes(name);
rdf.writeInt(age);
name="wangwu";
age=32;
rdf.writeBytes(name);
rdf.writeInt(age);
rdf.close();