code: public int write(long pos, byte b) throws IOException {
      prepareForWrite(pos, 1);
  
      byte[] block = blocks[blockIndex(pos)];
      int off = offsetInBlock(pos);
      block[off] = b;
  
      if (pos >= size) {
        size = pos + 1;
      }
  
      return 1;
    }
docs: Writes the given byte to this file at position {@code pos}. {@code pos} may be greater than the
  current size of this file, in which case this file is resized and all bytes between the current
  size and {@code pos} are set to 0. Returns the number of bytes written.
  
  @throws IOException if the file needs more blocks but the disk is full