code: @VisibleForTesting
    void performLazySeek(long bytesToRead) throws IOException {
      throwIfNotOpen();
  
      // Return quickly if there is no pending seek operation, i.e. position didn't change.
      if (currentPosition == contentChannelPosition && contentChannel != null) {
        return;
      }
  
      logger.atFine().log(
          "Performing lazySeek from %s to %s position with %s bytesToRead for '%s'",
          contentChannelPosition, currentPosition, bytesToRead, resourceIdString);
  
      // used to auto-detect random access
      long oldPosition = contentChannelPosition;
  
      long seekDistance = currentPosition - contentChannelPosition;
      if (contentChannel != null
          && seekDistance > 0
          // Always skip in place gzip-encoded files, because they do not support range reads.
          && (gzipEncoded || seekDistance <= readOptions.getInplaceSeekLimit())
          && currentPosition < contentChannelEnd) {
        logger.atFine().log(
            "Seeking forward %s bytes (inplaceSeekLimit: %s) in-place to position %s for '%s'",
            seekDistance, readOptions.getInplaceSeekLimit(), currentPosition, resourceIdString);
        skipInPlace(seekDistance);
      } else {
        closeContentChannel();
      }
  
      if (contentChannel == null) {
        if (isRandomAccessPattern(oldPosition)) {
          setRandomAccess();
        }
        openContentChannel(bytesToRead);
      }
    }
docs: Seeks to the {@link #currentPosition} in the underlying stream or opens new stream at {@link
  #currentPosition}.
  
  <p>Note: Seek could be an expensive operation if a new stream is opened.
  
  @param bytesToRead number of bytes to read, used only if new stream is opened.
  @throws java.io.FileNotFoundException if the underlying object does not exist.
  @throws IOException on IO error