1 package cn.jason.ios.streams;
2
3 import java.io.BufferedInputStream;
4 import java.io.BufferedOutputStream;
5 import java.io.File;
6 import java.io.FileInputStream;
7 import java.io.FileNotFoundException;
8 import java.io.FileOutputStream;
9 import java.io.FileReader;
10 import java.io.IOException;
11
12 /**
13 * 测试IO流 *
14 * 读取指定文件的信息
15 * @author 小风微灵
16 *
17 */
18 public class MyStream {
19
20 /**
21 * 字节流读取信息到控制台
22 * @param filePath 文件地址
23 * @throws IOException 抛出的异常
24 */
25 private static void getFileInfos_ZJ(String filePath) throws IOException{
26
27 //创建对象
28 File file=new File(filePath);
29
30 //FileInputStream 输入流
31 FileInputStream fis=