code: void write(BlockId blk, IoBuffer buffer) {
  		try {
  			IoChannel fileChannel = getFileChannel(blk.fileName());
  
  			// rewind the buffer
  			buffer.rewind();
  
  			// write the block to the file
  			fileChannel.write(buffer, blk.number() * BLOCK_SIZE);
  		} catch (IOException e) {
  			e.printStackTrace();
  			throw new RuntimeException("cannot write block" + blk);
  		}
  	}
docs: Writes the contents of a byte buffer into a disk block.
  
  @param blk
  a block ID
  @param buffer
  the byte buffer