public void seek(final long position) throws IOException {
    index.seek(position * 6);
    final int oldFile = fileNumber;
    fileNumber = index.readUnsignedShort();
    currentPosition = index.readInt();
    if (oldFile != fileNumber) {
      in = new RandomAccessFile(filenameGenerator.apply(fileNumber, compressed).toFile(), "r");
    }
    in.seek(currentPosition);
  }
Seek.

@param position the position
@throws IOException the io exception
util/src/main/java/org/hyperledger/besu/util/io/RollingFileReader.java