zoukankan      html  css  js  c++  java
  • 随机文件读写

    RandomAccessFile randomAccessFile = new RandomAccessFile("E:/test1.html", "r");
                RandomAccessFile w = new RandomAccessFile("E:/test12.html", "rw");
                byte[] b = new byte[2];
                int i = 0;
                for (; (i = randomAccessFile.read(b)) != -1; ) {
                    w.write(b);
                }
                randomAccessFile.close();
                w.close();
  • 相关阅读:
    3
    2
    1
    11
    12
    8888888888
    99999999999
    88888888888
    77777777
    10.23
  • 原文地址:https://www.cnblogs.com/zzq-include/p/12178150.html
Copyright © 2011-2022 走看看