public void seek(long pos) throws IOException {
		checkOpen();

		if (pos < 0) {
			throw new IOException("pos cannot be less than zero");
		}

		if (pos < bufferFileStartIndex || pos >= bufferFileStartIndex + BUFFER_SIZE) {
			// check if the last buffer contained it, and swap in if necessary
			swapInLast();
			if (pos < bufferFileStartIndex || pos >= bufferFileStartIndex + BUFFER_SIZE) {
				// not in either, gotta get a new one
				buffer = EMPTY;
				bufferOffset = 0;
				bufferFileStartIndex = pos;
			}
		}
		bufferOffset = pos - bufferFileStartIndex;
	}
Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs.  The offset may be
set beyond the end of the file. Setting the offset beyond the end
of the file does not change the file length.  The file length will
change only by writing after the offset has been set beyond the end
of the file.
@param      pos   the offset position, measured in bytes from the
                  beginning of the file, at which to set the file
                  pointer.
@throws  IOException  if <code>pos</code> is less than
                         <code>0</code> or if an I/O error occurs.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/GhidraRandomAccessFile.java