code: public static short getShort(ByteBuffer buf, int index) {
          return buf.order() == BIG_ENDIAN ? getShortB(buf, index) : getShortL(buf, index);
      }
docs: Reads a short value from the buffer starting at the given index relative to the current
  position() of the buffer, without mutating the buffer in any way (so it's thread safe).