code: public void set(int i, boolean value) {
  		int idx = i / 8;
  		if(idx >= bb.limit()) {
  			throw new IndexOutOfBoundsException();
  		}
  		int bit = 7 - (i % 8);
  		if(value) {
  			bb.put(idx, (byte) (bb.get(idx) | MASKS[bit]));
  		} else {
  			bb.put(idx,(byte) (bb.get(idx) & MASKSR[bit]));
  		}
  	}
docs: set the i'th bit to 1 or 0
  @param i bit number to set
  @param value if true, the bit is set to 1, otherwise it is set to 0