import java.io.IOException;
import java.io.RandomAccessFile;
public class RandomFileAccess {
public static void main(String[] args) throws IOException {
RandomAccessFile raf = new RandomAccessFile("d:/abc.txt", "rw");
// 你需要使用seek设置文件的偏移量
raf.seek(raf.length());
raf.writeChars("ajaxfan");
raf.close();
}
}

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-01-09
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案