@Override
    public void onRecoverDone(final int recoverPosition) {
        // Since the logs index in the segmentFile are discontinuous, we should set LastLogIndex by reading and deSerializing last entry log
        final ByteBuffer buffer = sliceByteBuffer();
        buffer.position(recoverPosition);
        final byte[] data = lookupData(recoverPosition);
        if (data != null) {
            final LogEntry lastEntry = LogEntryV2CodecFactory.getInstance().decoder().decode(data);
            if (lastEntry != null) {
                setLastLogIndex(lastEntry.getId().getIndex());
            }
        }
    }
Read data from the position
@param pos      the position to read
@return read data
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/segment/SegmentFile.java