/**
* 文件-(I流)--》程序
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
//1,建立文件與程序的聯繫
File f=new File("D:/a.txt");
//2,選擇流
InputStream is=new FileInputStream(f);
//3,操作數據
byte[] flush=new byte[31/*1024*/];
int len=0;
while(-1!=(len=is.read(flush))){
System.err.println("在這裏進行數據處理"+len+"字節:"+Arrays.toString(flush));
}
is.close();
}
}