import java.io.*;
class Example8_5{
   public static void main(String args[]){
        int b;
       byte tom[]=new byte[25];                            //定义字节数组，接收读取的字节
       try{
             File f=new File("Example8_5.java"); 
             FileInputStream readfile=new FileInputStream(f);   //创建输入流
             while((b=readfile.read(tom,0,25))!=-1) {          //通过循环读取字节存入字节数组
             String s=new String (tom,0,b);
             System.out.println(s); 
             }              
          readfile.close();                              //关闭文件流
        }
  catch(IOException e){
        	  System.out.println("读取文件错误"); 
      }
   }
}
