Java: convert int to unsigned








int toUnsigned(short i){
    return Short.toUnsignedInt(); // i&0xffff;
}

long toUnsigned(int i){
    return Integer.toUnsignedLong(); // i&0xffffffffl;
}



No comments:

Post a Comment