code: public void seek(long offset) throws IOException {
          if (offset < 0) {
              throw new IOException("offset < 0: " + offset);
          }
          try {
              Libcore.os.lseek(fd, offset, SEEK_SET);
          } catch (ErrnoException errnoException) {
              throw errnoException.rethrowAsIOException();
          }
      }
docs: Moves this file's file pointer to a new position, from where following
  {@code read}, {@code write} or {@code skip} operations are done. The
  position may be greater than the current length of the file, but the
  file's length will only change if the moving of the pointer is followed
  by a {@code write} operation.
  
  @param offset
  the new file pointer position.
  @throws IOException
  if this file is closed, {@code pos < 0} or another I/O error
  occurs.