code: public void setVal(int offset, Constant val, long txNum, LogSeqNum lsn) {
  		internalLock.writeLock().lock();
  		try {
  			modifiedBy.add(txNum);
  			if (lsn != null && lsn.compareTo(lastLsn) > 0)
  				lastLsn = lsn;
  			
  			// Put the last LSN in front of the data
  			lastLsn.writeToPage(contents, LAST_LSN_OFFSET);
  			contents.setVal(DATA_START_OFFSET + offset, val);
  		} finally {
  			internalLock.writeLock().unlock();
  		}
  	}
docs: Writes a value to the specified offset of this buffer's page. This method
  assumes that the transaction has already written an appropriate log
  record. The buffer saves the id of the transaction and the LSN of the log
  record. A negative lsn value indicates that a log record was not
  necessary.
  
  @param offset
  the byte offset within the page
  @param val
  the new value to be written
  @param txNum
  the id of the transaction performing the modification
  @param lsn
  the LSN of the corresponding log record