public static void encode ( short value , byte [ ] dst , int dstOffset ) { value ^= 0x8000 ; dst [ dstOffset ] = ( byte ) ( value >> 8 ) ; dst [ dstOffset + 1 ] = ( byte ) value ; }
Encodes the given signed short into exactly 2 bytes .