62,614
社区成员
发帖
与我相关
我的任务
分享
File file = new File("F://io//io.txt") ;
RandomAccessFile raf = new RandomAccessFile(file , "rw") ;
String str = raf.readUTF() ;
System.out.println(str);
File file = new File("C:\\0.txt");
try {
RandomAccessFile raf = new RandomAccessFile(file, "rw");
System.out.println("begin:" + raf);
while (raf.read()!=-1) {
String str = raf.readUTF();
System.out.println(str);
}
} catch (Exception e) {
e.printStackTrace();
}