Suppose you’re exporting data from a table in a special format for another program. The export file must have the number of rows of data written in the file, starting at the 9th character. You extend the File class, adding methods to create the export file, write the data in the special format, and record the number of rows written. The following is the method that records the number of rows.

function recordRowsWritten( )

   this.seek( 8 ) // 9th character == offset 8 

   this.write( "" + this.rowsExported ) // Convert number to string to write