code: public synchronized void write(int blockNumber, int blockOffset, byte[] buffer, int bufferOffset, int length) 
  			throws IOException {
  		long pointer = getBlockOffset(blockNumber) + blockOffset;
  		int writable = blockSize - blockOffset;
  		int writeLength = length;
  		if(writable < length) {
  			writeLength = writable;
  		}
  		if(mapped == true) {
  			MappedByteBuffer map = NikeFS2FileAccessMonitor.instance().requestMap(this);
  			map.position((int)pointer);
  			map.put(buffer, bufferOffset, writeLength);
  		} else {
  			rafile.seek(pointer);
  			rafile.write(buffer, bufferOffset, writeLength);
  		}
  	}
docs: Writes to this block.
  
  @param blockNumber Internal number of the block in question.
  @param blockOffset Offset within the block to commence writing at.
  @param buffer Buffer storing the data to be written.
  @param bufferOffset Offset within the buffer from where to read.
  @param length Number of bytes to be written.