FileInputStream fis = new FileInputStream ("yyy.txt");
byte[] arr = new byte[2];//定义字节数组空间为2
int len;
while(len = fis.read(arr) != -1){ //将字节流读取到字节数组中,每次只能读取两个字节
System.out.println(new String(arr,0,len)); //将字节数组转换为中文,从第0个开始到第len个
}
fis.close();