数据流的byte数组读取方法为什么我的这个方法运行结果不对?
public static void ReadByteUtils(String name) throws IOException{ FileInputStream in = new FileInputStream(name); byte[] bt = new byte[20*1024]; int a = in.read(bt, 0, bt.length); int j = 1; for(int i=0;i<=a-1;i++){ if(bt[i]<=0xf){ System.out.print("0"); } System.out.print(Integer.toHexString(bt[i]&0xff)+" "); if(j++%10==0){ System.out.println(); } } in.close(); }