code: public long getFilePointer() throws IOException {
          try {
              return Libcore.os.lseek(fd, 0L, SEEK_CUR);
          } catch (ErrnoException errnoException) {
              throw errnoException.rethrowAsIOException();
          }
      }
docs: Gets the current position within this file. All reads and
  writes take place at the current file pointer position.
  
  @return the current offset in bytes from the beginning of the file.
  
  @throws IOException
  if an error occurs while getting the file pointer of this
  file.