如题

解决方案 »

  1.   

    我不知道有没有更好的数组之间转换的办法,但是你可以使用Byte.byteValue()来转换成byte,然后不断循环就好。
      

  2.   

    public static byte[] byteObjectArrayToByteArray(Byte[] byteObjectArray){
    if(byteObjectArray==null) return null;
    byte[] b=new byte[byteObjectArray.length];
    for(int i=0;i<b.length;i++){
    b[i]=byteObjectArray[i].byteValue();
    }
    return b;
    }
      

  3.   

    Byte 类中有一个方法 public byte byteValue()作用是 "作为一个 byte 返回此 Byte 的值。"
    比如说你的Byte[] B;
    byte[] b=new byte[B.length];
    for(int i=0;i<b.length;i++)
    {

    b[i]=B[i].byteValue();
    }
    b[i]就是你要的结果
      

  4.   

    这种方法太低效了吧,难道java中没有别的方法了吗??