public static int putShort(byte[] bytes, int offset, short val) {
    if (LITTLE_ENDIAN) {
      val = Short.reverseBytes(val);
    }
    HBasePlatformDependent.putShort(bytes, offset + BYTE_ARRAY_BASE_OFFSET, val);
    return offset + Bytes.SIZEOF_SHORT;
  }
Put a short value out to the specified byte array position in big-endian format.
@param bytes  the byte array
@param offset position in the array
@param val    short to write out
@return incremented offset
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java