zoukankan      html  css  js  c++  java
  • 文件分割

    import java.io.File;
    import java.io.RandomAccessFile;
     
    public class SplitFile {
           public static void main(String[] args) throws Exception {
                File src = new File("D:/javac/2.txt" );
                RandomAccessFile rf = new RandomAccessFile(src,"r" );
                rf.seek(10); //跳跃多少个字节
                
                 byte[] flush = new  byte[512];
                 int len = 0;
                 while(-1!=(len=rf.read(flush))) {
                      String s = new String(flush,0,len);
                      System. out.println(s);
                }
                rf.close();
                
          }
    }
  • 相关阅读:
    导出 IIS 站点及配置
    redis
    mongo常用
    mongo分片集群
    mysql常用
    elk安装
    Oracle数据库迁移文档
    笔记
    ping 。sh
    光衰报警
  • 原文地址:https://www.cnblogs.com/king-/p/4389707.html
Copyright © 2011-2022 走看看