private static short unsignedValueOf ( byte value ) { short result ; if ( ( value & 0x80 ) != 0 ) { result = ( short ) ( value & 0x7F ) ; result |= 0x80 ; } else { result = value ; } return result ; }
Convert the unsigned value of a byte into a short .