如题

解决方案 »

  1.   

    字符转无符号字节???
    我只知道INT分有无符号,其它的还真不清楚知道两段这样的代码:
    有符号字节转成无符号字节,java int转成byte
    (1)
    int unsignedByte = signedByte >= 0 ? signedByte : 256 + signedByte;  
    (2)
    int byteValue;   
    int temp = intValue % 256;   
    if ( intValue < 0) {   
      byteValue =  temp < -128 ? 256 + temp : temp;   
    }   
    else {   
      byteValue =  temp > 127 ? temp - 256 : temp;   
    }  
      

  2.   

    这样转。
    char a='a';
    int inta=(int)a;
    out.println(inta);97
      

  3.   

    ?字符和int是对等的。无符号?