读取文件
import java.io.FileInputStream; public class Demo4 { public static void main(String[] args) throws Exception{ FileInputStream fis=new FileInputStream("f:\\qq账号.txt"); /*int data=0; while((data=fis.read())!=-1){ System.out.print((char)data); }*/ byte[] buf=new byte[11]; int count=0; while((count=fis.read(buf))!=-1){ System.out.println(new String(buf,0,count)); } fis.close(); } }