FileInputStream fileInputStream = new FileInputStream("test_dir/test_file.txt");
byte[] buffer = new byte[1024];
fileInputStream.read(buffer);FileInputStream fileInputStream = new FileInputStream("test_dir/test_file.txt");
byte[] buffer = new byte[1024];
fileInputStream.read(buffer, 0, buffer.length);假设数据小于1024字节。那么上面两段代码的效果是否完全相同?
添加回答
举报
0/150
提交
取消