question: public static byte [ ] writeUnsignedShort ( int s ) { ByteBuffer bb = ByteBuffer . allocate ( 2 ) ; bb . put ( ( byte ) ( ( s > > 8 ) & 0xff ) ) ; bb . put ( ( byte ) ( s & 0xff ) ) ; return bb . array ( ) ; }
target:  Writes an unsigned 16 bit big-endian number.