public static int writeShort ( byte [ ] target , int offset , short value ) { target [ offset ] = ( byte ) ( value >>> 8 & 255 ) ; target [ offset + 1 ] = ( byte ) ( value & 255 ) ; return Short . BYTES ; }
Writes the given 16 - bit Short to the given byte array at the given offset .