日期:2014-05-17 浏览次数:20728 次
byte[] b = {3,1,3,2,3,3,3,4,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int[] arr = new int[16]; for(int i = 0; i < 16; i++) { arr[i] = b[2 * i] * 16 + b [2 * i + 1]; }
------解决方案--------------------
byte[] arr = {......};
int[] int_ary = new int[16];
int j = 0;
for(int i = 0 ; i < arr.length ; i+=2){
int_ary[j] = arr[i]*16+arr[i+1];
j++;
}