字节流
字节流的输出流
在这里插入图片描述在这里插入图片描述
FileInputStream类
package demo01;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
public class demo02InputStrean {
public static void main(String[] args) throws IOException {
//1、创建FileInputStream对象,构造方法中绑定要读取的数据
FileInputStream fis= new FileInputStream(“a.txt”);
//byte[] bytes =new byte[2];
//int len= fis.read(bytes);//
//System.out.println(“读取到的长度”+len);
/System.out.println(bytes);
System.out.println(bytes[0]);//取出数组的值
System.out.println(bytes[1]);
System.out.println(Arrays.toString(bytes));/
//System.out.println(new String(bytes));
/* len= fis.read(bytes);//67、43
System.out.println("读取到的长度"+len);
System.out.println(new String(bytes));
len= fis.read(bytes);
System.out.println(len);
System.out.println(new String(bytes));
len= fis.read(bytes);//44、45
System.out.p