code: private void doWrite(int bits, int count) {
  
  		int frontBits = ((int) position) & 31;
  		int firstInt = (int) (position >> 5);
  
  		int sumBits = count + frontBits;
  		if (sumBits <= 32) {
  			int i = ints[firstInt];
  			int mask = frontMask(frontBits) | backMask(sumBits);
  			i &= mask;
  			i |= (bits << (32 - sumBits)) & ~mask;
  			ints[firstInt] = i;
  		} else {
  			int i = ints[firstInt];
  			int mask = frontMask(frontBits);
  			i &= mask;
  			int lostBits = sumBits - 32;
  			i |= (bits >> lostBits) & ~mask;
  			ints[firstInt] = i;
  
  			i = ints[firstInt + 1];
  			mask = backMask(lostBits);
  			i &= mask;
  			i |= (bits << (32 - lostBits)) & ~mask;
  			ints[firstInt + 1] = i;
  		}
  	}
docs: assumes count is non-zero