question: public static short unsignedByteToShort ( byte b ) { if ( ( b & 0x80 ) == 0x80 ) return ( short ) ( 128 + ( b & 0x7f ) ) ; return b ; }
target:  Converts an unsigned byte to a short.  By default, Java assumes that a byte is signed.