package TestIO;
import java.io.*;
public class Test01 {
public static void main(String[] args) throws Exception {
////内容是:abcdefg
String filepath= "C:/中国电视台直播源.txt";
//创建流
FileInputStream fis= new FileInputStream(filepath);
//创建数组
byte[] bytes = new byte[1024];
// while(true){
// int temp = fis.read(bytes);
// if(temp==-1) break;
// System.out.println(new String(bytes,0,temp));
// }
//升级循环
int temp = 0;
while((temp = fis.read(bytes)) != -1){
System.out.print(new String(bytes,0,temp));
}
fis.close();
}
}