字节数组
时间:2020-06-03 22:31:39
收藏:0
阅读:43
FileInputStream fis = new FileInputStream ("test.txt");//创建读取管道
byte[] arr = new byte[2]; //创建字节数组
int a = fis.read(arr); //将文件上的字节读取到字节数组中(a为读取到的有效字节个数)
for(byte b : arr){ //遍历字节数组
syso(b);
}
fis.close();
原文:https://www.cnblogs.com/wangffeng293/p/13040319.html
评论(0)