code: public static void setShort(final byte[] b, final short n, final int offset) {
          b[offset + 0] = (byte) (n >>> 8);
          b[offset + 1] = (byte) (n >>> 0);
      }
docs: Writes a big-endian 2-byte short at an offset in the given array.
  @param b The array to write to.
  @param offset The offset in the array to start writing at.
  @throws IndexOutOfBoundsException if the byte array is too small.