使用FileInputStream读取文件时跳过n个字节
import java.io.*; /*来自 时 代 Java 公 众 号 - nowjava.com*/ public class Main { public static void main(String[] args) { File file = new File("C://Folder//ReadString.txt"); try { FileInputStream fin = new FileInputStream(file); int ch; //skip first 10 bytes fin.skip(10); while( (ch = fin.read()) != -1 ) System.out.print((char) ch); /*来自 n o w j a v a . c o m*/ } catch(FileNotFoundException e) { System.out.println("File not found" + e);