code: public final short getShort (int baseOffset) {
        short bytes = 0;
        if (order == ByteOrder.BIG_ENDIAN) {
            bytes = (short)(byteArray.get(baseOffset) << 8);
            bytes |= (byteArray.get(baseOffset + 1) & 0xFF);
        } else {
            bytes = (short)(byteArray.get(baseOffset + 1) << 8);
            bytes |= (byteArray.get(baseOffset) & 0xFF);
        }
        return bytes;
      }
docs: Returns the short at the specified index.
  <p> The 2 bytes starting at the specified index are composed into a short according to the
  current byte order and returned. The position is not changed. </p>
  
  @param index the index, must not be negative and equal or less than {@code limit - 2}.
  @return the short at the specified index.
  @exception IndexOutOfBoundsException if {@code index} is invalid.