Get the record bookmark at this location.
@param iTargetPosition The position to retrieve the bookmark from.
@return The bookmark at this position (or null if not in the buffer).
163819
public Object elementAt(int iTargetPosition)
    {
        Object bookmark = null;
        if (this.inBufferArray(iTargetPosition))
            bookmark = m_aCurrentRecord[this.bufferToArrayIndex(iTargetPosition)];
        if (bookmark == gEmptyCell)
            bookmark = null;
        return bookmark;
    }
220527
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException
    {
        m_objCurrentCacheRecord = NONE;
        m_objCurrentLockedRecord = NONE;
        try {   // This caching logic is exactly the same as seek caching.
            Object objData = null;
            if ((m_mapCache == null) && (m_htCache == null))
                m_htCache = new Hashtable<Object,Object>();    // Okay, start caching keys and records
            if (m_htCache != null)
            {
                if (bookmark instanceof Integer)
                    objData = m_htCache.get(bookmark);    // Try to find this in the cache
            }
            m_mapCache = null;  // If seek is used, the grid cache is no good anymore.
            if (objData != null)
                m_objCurrentCacheRecord = bookmark;   // Current data is Cached
            if (objData == null)
            {
                m_objCurrentPhysicalRecord = NONE;
                objData = m_tableRemote.doSetHandle(bookmark, iOpenMode, strFields, iHandleType);
                if (objData instanceof Vector)
                    if (m_htCache != null)
                {
                    m_objCurrentPhysicalRecord = bookmark;    // Current data is current
                    m_objCurrentCacheRecord = bookmark;
                    m_htCache.put(bookmark, objData);
                }
            }
            return objData;
        } catch (RemoteException ex) {
            throw ex;
        }
    }
892196
protected int position()
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "position", this);

    int position = _absolutePosition + _buffer.position();

    if (tc.isEntryEnabled()) Tr.exit(tc, "position", new Integer(position));
    return position;
  }
117317
public void addElement(int iTargetPosition, Object bookmark)
    {
        if (iTargetPosition >= m_iRecordListMax)
            this.growAccessList(iTargetPosition);
        if (iTargetPosition >= m_iRecordListEnd)
            m_iRecordListEnd = iTargetPosition + 1;   // New logical end
        if (!this.validRecordIndex(iTargetPosition))
            return;     // This one doesn't belong in this list
    
        int iArrayIndex = this.listToArrayIndex(iTargetPosition);
        m_aRecords[iArrayIndex] = bookmark;
    }
1260104
static public Integer getAttachmentPosition(
			JSONObject targetDoc
			,String attachmentName
			) {
		
		JSONObject targetAttachments = targetDoc.optJSONObject("_attachments");
		if( null == targetAttachments ) {
			// No attachment on target doc
			return null;
		}
		
		JSONObject targetAttachment = targetAttachments.optJSONObject(attachmentName);
		if( null == targetAttachment ) {
			// Target document does not have an attachment with this name
			return null;
		}
		
		if( JSONSupport.containsKey(targetAttachment,"revpos") ){
			int revPos = targetAttachment.optInt("revpos",-1);
			if( revPos < 0 ){
				return null;
			}
			return revPos;
		}
		
		return null;
	}
1360775
public byte[] getPosition(byte field) {
		Iterator it = m_fieldsPosition.keySet().iterator();
		Byte B = field;
		while (it.hasNext()) {
			Position p = (Position) it.next();
			if (((Vector) m_fieldsPosition.get(p)).contains(B)) {
				return new byte[] { p.m_vertical, p.m_horizontal };
			}
		}
		if (field != ScoreElements._DEFAULT) {
			return getPosition(ScoreElements._DEFAULT);
		}
		return null;
	}
763172
@Nullable
    private String getItemKey(int position) {
        if (mMap != null) {
            return new ArrayList<>(mMap.entrySet()).get(position).getKey();
        } else if (mJsonArray != null) {
            return String.valueOf(position);
        }
        return null;
    }
819836
public int addNewBookmark(Object bookmark, int iHandleType)
    {
        if (bookmark == null)
            return -1;
        if (iHandleType != DBConstants.DATA_SOURCE_HANDLE)
        {   // The only thing that I know for sure is the bookmark is correct.
            DataRecord dataRecord = new DataRecord(null);
            dataRecord.setHandle(bookmark, iHandleType);
            bookmark = dataRecord;
        }

        int iIndexAdded = m_iEndOfFileIndex;
        if (m_iEndOfFileIndex == -1)
        { // End of file has not been reached - add this record to the "Add" buffer.
                // Add code here
        }
        else
        {
            // Update the record cached at this location
            m_gridBuffer.addElement(m_iEndOfFileIndex, bookmark, m_gridList);
            m_iEndOfFileIndex++;
        }
        return iIndexAdded;
    }
347599
public long getCurrentPosition() {
        try {
            return mPlayer.getCurrentPosition();
        } catch(Exception e) {
            Log.e(TAG, e.getMessage());
            return -1;
        }
    }
515126
public Integer getEnd() {
    if (mtasPositionType.equals(POSITION_RANGE)
        || mtasPositionType.equals(POSITION_SET)) {
      return mtasPositionEnd;
    } else if (mtasPositionType.equals(POSITION_SINGLE)) {
      return mtasPositionStart;
    } else {
      return null;
    }
  }
386919
public int bookmarkToIndex(Object bookmark)
    {
        if (bookmark != null)
            if (m_mapCache != null)
        {
            for (int iRowIndex = 0; iRowIndex < m_mapCache.size(); iRowIndex++)
            {
                Object data = m_mapCache.get(iRowIndex);
                if (data instanceof Vector)
                {
                    Object objID = ((Vector)data).get(0);
                    if (bookmark.equals(objID))
                        return iRowIndex;
                }
            }
        }
        return -1;  // Not found
    }
976630
private CompletableFuture<IteratorBatch<T>> fetch(int position) {
    return openFuture.thenCompose(initialBatch -> {
      if (!initialBatch.complete()) {
        return client.applyOn(partitionId, service -> nextFunction.next(service, initialBatch.id(), position))
            .thenCompose(nextBatch -> {
              if (nextBatch == null) {
                return close().thenApply(v -> null);
              }
              return CompletableFuture.completedFuture(nextBatch);
            });
      }
      return CompletableFuture.completedFuture(null);
    });
  }
646352
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        if ((iHandleType == DBConstants.OBJECT_ID_HANDLE) || (iHandleType == DBConstants.BOOKMARK_HANDLE))
        {
            BaseTable table = null;
            Object strTable = this.getInfoFromHandle(bookmark, true, iHandleType);
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                table = iterator.next();
                if (strTable.equals(table.getRecord().getHandle(DBConstants.OBJECT_SOURCE_HANDLE)))
                    break;
            }
            bookmark = this.getInfoFromHandle(bookmark, false, iHandleType);
            this.setCurrentTable(table);
        }
        else if (iHandleType == DBConstants.DATA_SOURCE_HANDLE)
        {
            BaseTable table = ((FullDataSource)bookmark).getTable();
            bookmark = ((FullDataSource)bookmark).getDataSource();
            this.setCurrentTable(table);
        }
        FieldList record = null;
        BaseTable table = this.getCurrentTable();
        if (table != null)
            record = table.setHandle(bookmark, iHandleType);
        else
            record = null;
        this.syncCurrentToBase();
        return record;
    }
1030953
public View getHeaderAt(int position) {
        if (position == MATCHED_STICKIED_HEADER) {
            return mStickiedHeader;
        }

        try {
            return (View)getChildAt(position).getTag();
        } catch (Exception e) {
        }
        return null;
    }
1161568
public EntryPosition getPosition(Object key, byte[] serializedKey) throws IOException {
      int segment = (key.hashCode() & Integer.MAX_VALUE) % segments.length;
      lock.readLock().lock();
      try {
         return IndexNode.applyOnLeaf(segments[segment], serializedKey, segments[segment].rootReadLock(), IndexNode.ReadOperation.GET_POSITION);
      } finally {
         lock.readLock().unlock();
      }
   }
507199
private int lowestNonNullIndex(int iTargetPosition)
    {
        Object bookmark = null;
        int iBookmarkIndex = iTargetPosition;
        while (bookmark == null)
        {
            int iArrayIndex = m_gridList.listToArrayIndex(iBookmarkIndex);
            iBookmarkIndex =  m_gridList.arrayToListIndex(iArrayIndex);   // Lowest valid bookmark
            bookmark = m_gridList.elementAt(iBookmarkIndex);
            if (bookmark == null)
            {
                if (iBookmarkIndex == 0)
                    return -1;  // None found
                iBookmarkIndex--;
                if (m_gridBuffer != null)
                    bookmark = m_gridBuffer.elementAt(iBookmarkIndex);  // Check to see if it's in this list
            }
        }
        return iBookmarkIndex;  // Valid bookmark, return it.
    }
1319938
@Override
	// @NotThreadSafe
	public byte get(long position) throws IOException {
		return mappedBuffers.get(getBufferNum(position)).get(getIndex(position));
	}