这样转一下
    byte b = -1;
    int n = b < 0 ? 256 + b : b;

解决方案 »

  1.   

    sorry just give you 40.
    i've solved this problme and it wasn't use your method. 
    may i am not completely understand your words.
                            for (int z = 0; z < 167; z++){
                                for (int y = 0; y < 256; y++){
                                    for (int x = 0; x < 256; x++){
                                        mydata[z][y][x] = pic.readUnsignedByte();
                                    }
                                }
                            }