private int getItemIndexFromCurItemIndex(int elemIndex) {
    int index = this.curItemIndex;
    while (elemIndex >= this.itemBeginPos[index]) {
      index++;
      if (index == this.itemBeginPos.length) {
        throw new IndexOutOfBoundsException();
      }
    }
    return index - 1;
  }
Fetches the byte at the given index. Does not change position of the underlying ByteBuffers
@return the byte at the given index
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java